@Test
    public void testHeaderOkNewName() {
        final WebContext context = MockWebContext.create().addRequestHeader(NAME, VALUE);
        final SessionStore sessionStore = new MockSessionStore();
        sessionStore.set(context, Pac4jConstants.CSRF_TOKEN, VALUE);
        sessionStore.set(context, Pac4jConstants.CSRF_TOKEN_EXPIRATION_DATE, expirationDate);
        authorizer.setHeaderName(NAME);
        Assert.assertTrue(authorizer.isAuthorized(context, sessionStore, null));
    }
Tests {@link CsrfAuthorizer}.

@author Jerome Leleu
@since 1.8.0
pac4j-core/src/test/java/org/pac4j/core/authorization/authorizer/CsrfAuthorizerTests.java