@Test
    public void testFlatIntoOneProfileNProfiles() {
        val profile2 = new CommonProfile();
        profile2.setId("TWO");
        val profiles = Arrays.asList( AnonymousProfile.INSTANCE, null, profile2 );
        assertEquals(profile2, ProfileHelper.flatIntoOneProfile(profiles).get());
    }
Tests {@link ProfileHelper}.

@author Jerome Leleu
@since 1.9.0
pac4j-core/src/test/java/org/pac4j/core/profile/ProfileHelperTests.java