@Test
    public void testRetrieveDigestHeaderComponents() {
        val context = MockWebContext.create();
        context.addRequestHeader(HttpConstants.AUTHORIZATION_HEADER, DIGEST_AUTHORIZATION_HEADER_VALUE);
        val credentials = (DigestCredentials) digestExtractor.extract(new CallContext(context, new MockSessionStore())).get();
        assertEquals(DIGEST_RESPONSE, credentials.getToken());
        assertEquals(USERNAME, credentials.getUsername());
    }
This class tests the {@link DigestAuthExtractor}
@author Mircea Carasel
@since 1.9.0
pac4j-http/src/test/java/org/pac4j/http/credentials/extractor/DigestExtractorTests.java