@Test
    void verifyConsentDecisionIsUpdated() 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 t = LocalDateTime.now(ZoneId.systemDefault());
        assertNotEquals(t, decision.getCreatedDate());
        decision.setCreatedDate(t);
        this.repository.storeConsentDecision(decision);

        val r2 = getConnection().search(USER_DN, SearchScope.SUB, DEF_FILTER, ATTR_NAME);
        assertTrue(r2.getEntryCount() > 0);
        val d = MAPPER.readValue(r2.getSearchEntry(USER_DN).getAttributeValue(ATTR_NAME), ConsentDecision.class);
        assertNotNull(d);
        assertEquals(d.getId(), decision.getId());
        assertEquals(d.getCreatedDate(), t);
    }
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