@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 searchOp = LdapUtils.newLdaptiveSearchOperation("ou=people,dc=example,dc=org", "cn={user}", List.of("casTest"));
        searchOp.setConnectionFactory(LdapUtils.newLdaptiveConnectionFactory(ldap));
        val groupSearchOp = LdapUtils.newLdaptiveSearchOperation("ou=people,dc=example,dc=org", "businessCategory={user}", List.of("casTest"));
        groupSearchOp.setConnectionFactory(searchOp.getConnectionFactory());

        val generator = new LdapUserGroupsToRolesAuthorizationGenerator(searchOp, false,
            "unknown", "GRP", groupSearchOp);
        val principal = PrincipalFactoryUtils.newPrincipalFactory().createPrincipal("casTest");

        val result = generator.apply(principal);
        assertTrue(result.isEmpty());
    }
This is {@link LdapUserGroupsToRolesAuthorizationGeneratorTests}.

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