@Test
public void testRequestWithIncompleteAuthorization() {

  HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
  HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
  Mockito.when(request.getHeader(KerberosAuthenticator.AUTHORIZATION))
    .thenReturn(KerberosAuthenticator.NEGOTIATE);
  try {
    handler.authenticate(request, response);
    Assert.fail();
  } catch (AuthenticationException ex) {
    // Expected
  } catch (Exception ex) {
    Assert.fail();
  }
}