@Test
    public void testCsrfCheckPostTokenParameter() {
        val context = MockWebContext.create().setRequestMethod(HttpConstants.HTTP_METHOD.POST.name());
        val generator = new DefaultCsrfTokenGenerator();
        final SessionStore sessionStore = new MockSessionStore();
        val token = generator.get(context, sessionStore);
        context.addRequestParameter(Pac4jConstants.CSRF_TOKEN, token);
        sessionStore.set(context, Pac4jConstants.CSRF_TOKEN, token);
        sessionStore.set(context, Pac4jConstants.CSRF_TOKEN_EXPIRATION_DATE, new Date().getTime() + 1000 * generator.getTtlInSeconds());
        assertTrue(checker.isAuthorized(context, sessionStore, profiles, DefaultAuthorizers.CSRF_CHECK, new HashMap<>(),
            new ArrayList<>()));
    }
Tests the {@link DefaultAuthorizationChecker}.

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