@Test
    public void testState() throws MalformedURLException {
        var client = new FacebookClient(KEY, SECRET);
        client.setCallbackUrl(CALLBACK_URL);
        client.getConfiguration().setStateGenerator(new StaticValueGenerator("OK"));
        WithLocationAction action = (FoundAction) client.getRedirectionAction(
            new CallContext(MockWebContext.create(), new MockSessionStore())).get();
        var url = new URL(action.getLocation());
        assertTrue(url.getQuery().contains("state=OK"));
    }
This class tests the {@link OAuth20Client} class.

@author Jerome Leleu
@since 1.0.0
pac4j-oauth/src/test/java/org/pac4j/oauth/client/OAuth20ClientTests.java