### Question:
MonitoredOperations implements SessionOperations { @Override public SessionInfo refresh(Session session, boolean reset) throws SessionException { final long start = System.nanoTime(); final SessionInfo response = sessionOperations.refresh(session, reset); sessionMonitoringStore.storeRefreshTime(System.nanoTime() - start, monitorType); return response; } 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 refreshTest() throws SessionException { Session mockSession = mock(Session.class); boolean reset = true; testMoniteredOperations.refresh(mockSession, reset); verify(mockSessionOperations).refresh(mockSession, reset); verify(mockStore).storeRefreshTime(anyLong(), any(SessionMonitorType.class)); }