UserSessionAssist implements ResponseContextCodes { public User logout(String userName) throws GameBootRuntimeException { UserSession session = expected(userName); closeSession(session); return session.getUser(); }  @PostConstruct void postConstruct(); UserSession create(User user); User expectedUser(String userName); UserSession expected(String userName); UserSession expected(User user); UserSession expected(Long id); boolean hasSession(String userName); boolean hasSession(Long id); User logout(String userName); User logout(Long id); @Cacheable(cacheNames = SESSIONS_CACHE, key = "target.sessionsKey") List<UserSession> activeSessions(); String getSessionsKey(); static final String SESSIONS_CACHE; static final String SESSIONS_KEY; }
@Test @Transactional public void testLogoutUserName() throws Exception { testLogout(() -> assist.logout(USER_NAME)); }
@Test @Transactional public void testLogoutId() throws Exception { testLogout(() -> assist.logout(sessionId)); }