@Test
    public void testDoubleDirectClientSupportingMultiProfile() {
        val profile = new CommonProfile();
        profile.setId(NAME);
        val profile2 = new CommonProfile();
        profile2.setId(VALUE);
        final DirectClient directClient = new MockDirectClient(NAME, Optional.of(new MockCredentials()), profile);
        directClient.setMultiProfile(true);
        final DirectClient directClient2 = new MockDirectClient(VALUE, Optional.of(new MockCredentials()), profile2);
        directClient2.setMultiProfile(true);
        config.setClients(new Clients(CALLBACK_URL, directClient, directClient2));
        clients = NAME + "," + VALUE;
        call();
        assertEquals(-1, context.getResponseStatus());
        assertEquals(1, nbCall);
        Map<String, CommonProfile> profiles =
            (LinkedHashMap<String, CommonProfile>) context.getRequestAttribute(Pac4jConstants.USER_PROFILES).get();
        assertEquals(2, profiles.size());
        assertTrue(profiles.containsValue(profile));
        assertTrue(profiles.containsValue(profile2));
    }
Tests {@link DefaultSecurityLogic}.

@author Jerome Leleu
@since 1.9.0
pac4j-core/src/test/java/org/pac4j/core/engine/DefaultSecurityLogicTests.java