@Test
    void verifyOperation() throws Throwable {
        val ldap = new Ldap();
        ldap.setBaseDn("ou=people,dc=example,dc=org");
        ldap.setLdapUrl("ldap://localhost:10389");
        ldap.setBindDn("cn=Directory Manager");
        ldap.setBindCredential("password");

        val principal = PrincipalFactoryUtils.newPrincipalFactory().createPrincipal("casTest");
        List.of(ReturnAttributes.NONE, ReturnAttributes.ALL).forEach(ret -> {
            val searchOp = LdapUtils.newLdaptiveSearchOperation("ou=people,dc=example,dc=org",
                "cn={user}", List.of("casTest"), List.of(ret.value()));
            searchOp.setConnectionFactory(LdapUtils.newLdaptiveConnectionFactory(ldap));
            val generator = new LdapUserAttributesToRolesAuthorizationGenerator(searchOp, false, "unknown", "ROLE");
            val result = generator.apply(principal);
            assertTrue(result.isEmpty());
        });
    }
This is {@link LdapUserAttributesToRolesAuthorizationGeneratorTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-ldap-core/src/test/java/org/apereo/cas/authorization/LdapUserAttributesToRolesAuthorizationGeneratorTests.java