@AfterEach
    public void cleanDecisions() {
        try (val conn = getConnection()) {
            val res = conn.search(USER_DN, SearchScope.SUB, DEF_FILTER, ATTR_NAME);
            if (res.getEntryCount() != 0 && res.getSearchEntry(USER_DN).hasAttribute(ATTR_NAME)) {
                LOGGER.debug("Clearing out [{}] for [{}]", ATTR_NAME, USER_DN);
                conn.modify(USER_DN, new Modification(ModificationType.DELETE, ATTR_NAME));
            }
        } catch (final Exception e) {
            LOGGER.debug(e.getMessage(), e);
        }

        try (val conn = getConnection()) {
            val res2 = conn.search(USER2_DN, SearchScope.SUB, DEF_FILTER, ATTR_NAME);
            if (res2.getEntryCount() != 0 && res2.getSearchEntry(USER2_DN).hasAttribute(ATTR_NAME)) {
                LOGGER.debug("Clearing out [{}] for [{}]", ATTR_NAME, USER_DN);
                conn.modify(USER2_DN, new Modification(ModificationType.DELETE, ATTR_NAME));
            }
        } catch (final Exception e) {
            LOGGER.debug(e.getMessage(), e);
        }
    }
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