@Test
    public void testRoles() {
        UserProfile profile = new CommonProfile();
        assertEquals(0, profile.getRoles().size());
        profile.addRole(ROLE1);
        assertEquals(1, profile.getRoles().size());
        assertTrue(profile.getRoles().contains(ROLE1));
    }
This class tests the {@link CommonProfile} class.
@author Jerome Leleu
@since 1.0.0
pac4j-core/src/test/java/org/pac4j/core/profile/CommonProfileTests.java