@Test
    public void testRetrieveHeaderOk() {
        val context = MockWebContext.create().addRequestHeader(GOOD_HEADER, GOOD_PREFIX + VALUE);
        val credentials = (TokenCredentials) extractor.extract(new CallContext(context, null)).get();
        assertEquals(VALUE, credentials.getToken());
    }
This class tests the {@link HeaderExtractor}.

@author Jerome Leleu
@since 1.8.0
pac4j-core/src/test/java/org/pac4j/core/credentials/extractor/HeaderExtractorTests.java