Http { static String authenticatingCredentials(HttpServletRequest request, Authority authority) { final String header = authority.getHeader(); if (header == null) { return null; } return header.startsWith("Cookie.") ? getCookieValue(request, header.substring(7)) : request.getHeader(header); }  static Principal authenticate(HttpServletRequest request,
            AuthorityList authorities); static Principal authenticate(HttpServletRequest request,
            AuthorityList authorities, boolean optionalAuth); static String authenticatedUser(HttpServletRequest request,
            AuthorityList authorities); static String authorizedUser(HttpServletRequest request,
            AuthorityList authorities, Authorizer authorizer, String action,
            String resource, String otherDomain); static Principal authorize(Authorizer authorizer, Principal principal,
            String action, String resource, String otherDomain); static final String WWW_AUTHENTICATE; static final String INVALID_CRED_ATTR; static final String AUTH_CHALLENGES; static final String JAVAX_CERT_ATTR; }
@Test public void testAuthenticatingCredentialsHeaderNull() { Authority authority = Mockito.mock(Authority.class); Mockito.when(authority.getHeader()).thenReturn(null); assertNull(Http.authenticatingCredentials(null, authority)); }