@Test
    public void testAlreadyTried() {
        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();
        sessionStore.set(context, client.getName() + IndirectClient.ATTEMPTED_AUTHENTICATION_SUFFIX, "true");
        val e = (HttpAction) TestsHelper.expectException(() -> client.getRedirectionAction(new CallContext(context, sessionStore)));
        assertEquals(401, e.getCode());
    }
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