@Test
    public void testGetRightCredentials() {
        val formClient = getFormClient();
        val credentials = (UsernamePasswordCredentials) formClient.getCredentials(new CallContext(MockWebContext.create()
                .addRequestParameter(formClient.getUsernameParameter(), USERNAME)
                .addRequestParameter(formClient.getPasswordParameter(), USERNAME), new MockSessionStore())).get();
        assertEquals(USERNAME, credentials.getUsername());
        assertEquals(USERNAME, credentials.getPassword());
        assertEquals(CredentialSource.FORM.name(), credentials.getSource());
    }
This class tests the {@link FormClient} class.

@author Jerome Leleu
@since 1.4.0
pac4j-http/src/test/java/org/pac4j/http/client/indirect/FormClientTests.java