@Test
    void verifyDeleteRecordsForPrincipal() throws Throwable {
        val user = getUser();
        val repo = getRepository();
        repo.deleteAll();
        val decision = BUILDER.build(SVC, REG_SVC, user, ATTR);

        decision.setId(200);
        val result = repo.storeConsentDecision(decision);
        assertNotNull(result);
        await().untilAsserted(() -> assertTrue(repo.deleteConsentDecisions(result.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