@Test
    public void testBadPrefix() {
        val context = MockWebContext.create().addRequestHeader(GOOD_HEADER, BAD_PREFIX + VALUE);
        TestsHelper.expectException(() -> extractor.extract(new CallContext(context, null)), CredentialsException.class,
            "Wrong prefix for header: " + GOOD_HEADER);
    }
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