@Test
    public void testListRoles() {
        val roleAttributes = new String[] {
                ATTRIB3, ATTRIB4
        };
        AuthorizationGenerator generator = new FromAttributesAuthorizationGenerator(roleAttributes);
        generator.generate(null, this.profile);
        val roles = this.profile.getRoles();
        assertEquals(ATTRIB_ARRAY.length + ATTRIB_LIST.size(), roles.size());
        for(var value : ATTRIB_ARRAY) {
            assertTrue(roles.contains(value));
        }
        for(var value : ATTRIB_LIST) {
            assertTrue(roles.contains(value));
        }
    }
This class tests {@link FromAttributesAuthorizationGenerator}.

@author Jerome Leleu
@since 1.5.0
pac4j-core/src/test/java/org/pac4j/core/authorization/generator/FromAttributesAuthorizationGeneratorTests.java