SessionManagerImpl implements SessionManager { @Override public Session startSession( String sessionId, Session userSession, User user ) { try { if ( userSession == null ) { Date currentDate = new Date( System.currentTimeMillis() ); userSession = new SessionEntity(); userSession.setUser( user ); userSession.setStatus( 1 ); userSession.setStartDate( currentDate ); userSession.setEndDate( DateUtils.addMinutes( currentDate, SESSION_TIMEOUT ) ); sessionContext.put( sessionId, userSession ); } else { extendSessionTime( userSession ); } } catch ( Exception e ) { LOG.error( e.getMessage() ); } return userSession; } SessionManagerImpl( IdentityDataService identityDataService ); @Override void startSessionController(); @Override void stopSessionController(); @Override Session startSession( String sessionId, Session userSession, User user ); @Override Session getValidSession( String sessionId ); @Override void extendSessionTime( Session userSession ); @Override void extendSessionTime( String sessionId ); @Override void endSession( String sessionId ); @PermitAll @Override void invalidateSessions( Date currentDate ); @Override int getSessionTimeout(); static void setSessionTimeout( final int sessionTimeout ); @Override Map getSessionContext();  }
@Test public void testStartSession() { assertNotNull(session); }