@Test
    void verifyLargeDataset() throws Throwable {
        val principal = UUID.randomUUID().toString();
        for (var i = 0; i < COUNT; i++) {
            val service = RegisteredServiceTestUtils.getService(UUID.randomUUID().toString());
            val registeredService = RegisteredServiceTestUtils.getRegisteredService(service.getId());
            val decision = BUILDER.build(service, registeredService, principal,
                CollectionUtils.wrap("attribute%d".formatted(i), List.of("value%d".formatted(i))));
            repository.storeConsentDecision(decision);
        }

        var stopwatch = new StopWatch();
        stopwatch.start();
        assertEquals(COUNT, repository.findConsentDecisions(principal).size());
        stopwatch.stop();
        assertTrue(stopwatch.getTime(TimeUnit.SECONDS) <= 10);
    }
This is {@link JpaConsentRepositoryTests}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-consent-jdbc/src/test/java/org/apereo/cas/consent/JpaConsentRepositoryTests.java