@Test
    public void testDirectClient() {
        val client =
            new MockIndirectClient(TYPE, new FoundAction(LOGIN_URL), Optional.empty(), new CommonProfile());
        client.setCallbackUrl(CALLBACK_URL);
        val context = MockWebContext.create();
        final SessionStore sessionStore = new MockSessionStore();
        WithLocationAction action = (FoundAction) client.getRedirectionAction(new CallContext(context, sessionStore)).get();
        val redirectionUrl = action.getLocation();
        assertEquals(LOGIN_URL, redirectionUrl);
        val credentials = client.getCredentials(new CallContext(context, sessionStore));
        assertFalse(credentials.isPresent());
    }
This class tests the {@link BaseClient} class.

@author Jerome Leleu
@since 1.4.0
pac4j-core/src/test/java/org/pac4j/core/client/BaseClientTests.java