AbstractHttpAuthenticationHandler implements HttpAuthenticationHandler { protected String getAuthzHeader(final HttpServletRequest request) { return StringUtils.trimToEmpty(request.getHeader(AUTHORIZATION_HEADER)); }  @Override boolean isLoginAttempt(final HttpServletRequest request); @Override void sendChallenge(final HttpServletResponse response);  }
@Test public void testGetAuthzHeader() throws Exception { final MockHttpServletRequest request = new MockHttpServletRequest(); assertEquals("", handler.getAuthzHeader(request)); request.addHeader(AbstractHttpAuthenticationHandler.AUTHORIZATION_HEADER, "Basic xyz:abc"); assertEquals("Basic xyz:abc", handler.getAuthzHeader(request)); }