### Question:
MonitoredOperations implements SessionOperations { @Override public void logout(Session session) throws SessionException { final long start = System.nanoTime(); sessionOperations.logout(session); sessionMonitoringStore.storeLogoutTime(System.nanoTime() - start, monitorType); } MonitoredOperations(SessionOperations sessionOperations, SessionMonitorType monitorType,
                               SessionMonitoringStore sessionMonitoringStore); @Override SessionInfo refresh(Session session, boolean reset); @Override void logout(Session session); @Override void destroy(Session requester, Session session); @Override void setProperty(Session session, String name, String value); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void logoutTest() throws SessionException { Session mockSession = mock(Session.class); testMoniteredOperations.logout(mockSession); verify(mockSessionOperations, times(1)).logout(mockSession); verify(mockStore).storeLogoutTime(anyLong(), any(SessionMonitorType.class)); }