SessionMonitor { protected void verifyAll() { for (T session : sessionManager.getSessionMap().values()) { sessionVerifier.verifySession(session); } monitorState.endVerification(time.getCurrentTimeMillis()); } SessionMonitor(SessionManager<T> sessionManager, ExecutorService executorService,
            SessionVerifier<T> sessionVerifier);   SessionMonitor(SessionManager<T> sessionManager, SystemCurrentTimeProvider time,
            ExecutorService executorService, MonitorState monitorState, SessionVerifier
            sessionVerifier); void monitorActivityLifecycle(ActivityLifecycleManager activityLifecycleManager); void triggerVerificationIfNecessary();  }
@Test public void testVerifyAll_verifiesAllSessions() { sessionMap.put(2L, mock(Session.class)); sessionMonitor.verifyAll(); verify(mockSessionVerifier, times(2)).verifySession(any(Session.class)); }
@Test public void testVerifyAll_shouldNotImmediatelyReverify() { when(mockSystemCurrentTimeProvider.getCurrentTimeMillis()).thenReturn(TEST_TIME_1200_UTC); sessionMonitor.verifyAll(); assertFalse(sessionMonitor.monitorState.beginVerification(TEST_TIME_1200_UTC + 1)); }