@Test
    public void testGetBadCredentials() {
        val formClient = getFormClient();
        val context = MockWebContext.create()
            .addRequestParameter(formClient.getUsernameParameter(), USERNAME)
            .addRequestParameter(formClient.getPasswordParameter(), PASSWORD);
        val ctx = new CallContext(context, new MockSessionStore());
        val credentials = formClient.getCredentials(ctx).get();
        assertFalse(formClient.validateCredentials(ctx, credentials).isPresent());
    }
This class tests the {@link DirectFormClient} class.

@author Jerome Leleu
@since 1.8.6
pac4j-http/src/test/java/org/pac4j/http/client/direct/DirectFormClientTests.java