private void verifyGetCredentialsFailsWithAuthenticationRequired(
            IndirectBasicAuthClient basicAuthClient,
            MockWebContext context) {
        try {
            basicAuthClient.getCredentials(new CallContext(context, new MockSessionStore()));
            fail("should throw HttpAction");
        } catch (final HttpAction e) {
            assertEquals(401, e.getCode());
            assertEquals("Basic realm=\"authentication required\"",
                    context.getResponseHeaders().get(HttpConstants.AUTHENTICATE_HEADER));
        }
    }
This class tests the {@link IndirectBasicAuthClient} class.

@author Jerome Leleu
@since 1.4.0
pac4j-http/src/test/java/org/pac4j/http/client/indirect/IndirectBasicAuthClientTests.java