@Test
    public void testFluent() {
        Client client = new MockIndirectClient(NAME, new FoundAction(LOGIN_URL), Optional.empty(), new CommonProfile());
        Authorizer authorizer = new RequireAnyRoleAuthorizer();
        Matcher matcher = new CacheControlMatcher();
        val config = new Config(CALLBACK_URL).addClient(client).addAuthorizer(NAME, authorizer).addMatcher(NAME, matcher);
        assertEquals(CALLBACK_URL, config.getClients().getCallbackUrl());
        assertEquals(1, config.getClients().findAllClients().size());
        assertEquals(client, config.getClients().findAllClients().get(0));
        assertEquals(1, config.getAuthorizers().size());
        assertEquals(authorizer, config.getAuthorizers().get(NAME));
        assertEquals(1, config.getMatchers().size());
        assertEquals(matcher, config.getMatchers().get(NAME));
    }
Tests the {@link Config}.

@author Jerome Leleu
@since 1.8.0
pac4j-core/src/test/java/org/pac4j/core/config/ConfigTests.java