@Test
    void verifyConsentDecisionIsFound() throws Throwable {
        val user = getUser();
        val repo = getRepository();
        var decision = BUILDER.build(SVC, REG_SVC, user, ATTR);
        decision.setId(100);
        decision = repo.storeConsentDecision(decision);
        assertNotNull(decision);
        decision = repo.storeConsentDecision(decision);
        assertNotNull(decision);

        val d = repo.findConsentDecision(SVC, REG_SVC, CoreAuthenticationTestUtils.getAuthentication(user));
        assertNotNull(d);
        assertEquals(user, d.getPrincipal());

        assertTrue(repo.deleteConsentDecision(d.getId(), d.getPrincipal()));
        await().untilAsserted(() -> assertNull(repo.findConsentDecision(SVC, REG_SVC,
            CoreAuthenticationTestUtils.getAuthentication(user))));

    }
This is {@link BaseConsentRepositoryTests}.

@author Timur Duehr
@since 6.0.0
support/cas-server-support-consent-core/src/test/java/org/apereo/cas/consent/BaseConsentRepositoryTests.java