@Test(timeout = 60000)
public void testRequestWithoutAuthorization() throws Exception {

  HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
  HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
  Assert.assertNull(handler.authenticate(request, response));
  Mockito.verify(response).setHeader(WWW_AUTHENTICATE, HttpConstants.BASIC);
  Mockito.verify(response).setStatus(HttpServletResponse.SC_UNAUTHORIZED);
}