AbstractHttpAuthenticationHandler implements HttpAuthenticationHandler { @Override public boolean isLoginAttempt(final HttpServletRequest request) { return getAuthzHeader(request).toLowerCase().startsWith(getAuthScheme().toLowerCase()); }  @Override boolean isLoginAttempt(final HttpServletRequest request); @Override void sendChallenge(final HttpServletResponse response);  }
@Test public void testIsLoginAttempt() throws Exception { final MockHttpServletRequest request = new MockHttpServletRequest(); assertFalse(handler.isLoginAttempt(request)); request.addHeader(AbstractHttpAuthenticationHandler.AUTHORIZATION_HEADER, "Basic xyz:abc"); assertTrue(handler.isLoginAttempt(request)); }