SessionTracker extends BaseObservable { @Nullable @VisibleForTesting Session startNewSession(@NonNull Date date, @Nullable User user, boolean autoCaptured) { String id = UUID.randomUUID().toString(); Session session = new Session(id, date, user, autoCaptured, client.getNotifier(), logger); currentSession.set(session); trackSessionIfNeeded(session); return session; } SessionTracker(ImmutableConfig configuration, CallbackState callbackState,
                   Client client, SessionStore sessionStore, Logger logger);   SessionTracker(ImmutableConfig configuration, CallbackState callbackState,
                   Client client, long timeoutMs, SessionStore sessionStore, Logger logger);   }
@Test public void startNewSession() { assertNotNull(sessionTracker); assertNull(sessionTracker.getCurrentSession()); Date date = new Date(); sessionTracker.startNewSession(date, user, false); Session newSession = sessionTracker.getCurrentSession(); assertNotNull(newSession); assertNotNull(newSession.getId()); assertEquals(date.getTime(), newSession.getStartedAt().getTime()); assertNotNull(newSession.getUser()); }