@Test
    public void testGetCredentialsGoodCredentials() {
        val basicAuthClient = getBasicAuthClient();
        val header = USERNAME + ":" + USERNAME;
        val credentials = (UsernamePasswordCredentials) basicAuthClient
            .getCredentials(new CallContext(getContextWithAuthorizationHeader("Basic "
                + Base64.getEncoder().encodeToString(header.getBytes(StandardCharsets.UTF_8))), new MockSessionStore())).get();
        assertEquals(USERNAME, credentials.getUsername());
        assertEquals(USERNAME, credentials.getPassword());
    }
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