LogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler { @Override public void onLogoutSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) throws IOException, ServletException { super.onLogoutSuccess(request, response, authentication); }  @Override void onLogoutSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication);  }
@Test public void testOnLogouSuccess() throws Exception { Session session = new Session(); when(authentication.getDetails()).thenReturn(session); unit.onLogoutSuccess(request, response, authentication); }
@Test public void testOnLogouSuccessWithEmptySession() throws Exception { Session session = new Session(); unit.onLogoutSuccess(request, response, authentication); verify(authentication, times(0)).getDetails(); }