@Test
    void verifyAllConsentDecisionsAreFoundForSingleUser() throws Throwable {
        val decision = BUILDER.build(SVC, REG_SVC, USER_CN, ATTR);
        decision.setId(1);
        val mod = new Modification(ModificationType.ADD, ATTR_NAME, MAPPER.writeValueAsString(decision));
        assertEquals(ResultCode.SUCCESS, getConnection().modify(USER_DN, mod).getResultCode());
        val decision2 = BUILDER.build(SVC, REG_SVC, USER2_CN, ATTR);
        decision2.setId(2);
        val mod2 = new Modification(ModificationType.ADD, ATTR_NAME, MAPPER.writeValueAsString(decision2));
        assertEquals(ResultCode.SUCCESS, getConnection().modify(USER2_DN, mod2).getResultCode());

        val d = this.repository.findConsentDecisions(USER_CN);
        assertNotNull(d);
        assertEquals(1, d.size());
        assertEquals(USER_CN, d.iterator().next().getPrincipal());
    }
This is {@link BaseLdapConsentRepositoryTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-consent-ldap/src/test/java/org/apereo/cas/consent/BaseLdapConsentRepositoryTests.java