@Test
public void testTerminateSession() {

    LOG.info("testTerminateSession");
    Mockito.when(httpServletRequest.getSession(false)).thenReturn(httpSession);
    Mockito.doNothing().when(httpSession).invalidate();
    impl.terminateSession();
    verify(httpServletRequest).getSession(false);
    // Check that the session data was removed from the session.
    verify(httpSession).removeAttribute(SESSION_DATA_KEY);
    // Check that the session was invalidated.
    verify(httpSession).invalidate();
}