@Override
            public void run() {
                for (var i = 0; i < 5; i++) {
                    FunctionUtils.doUnchecked(__ -> {
                        val tgt = new TicketGrantingTicketImpl(TicketGrantingTicket.PREFIX + '-' + RandomUtils.randomAlphabetic(16),
                            CoreAuthenticationTestUtils.getAuthentication(UUID.randomUUID().toString()),
                            new HardTimeoutExpirationPolicy(1));
                        ticketRegistry.addTicket(tgt);

                        val st = tgt.grantServiceTicket(
                            ServiceTicket.PREFIX + '-' + RandomUtils.randomAlphabetic(16), RegisteredServiceTestUtils.getService(),
                            new HardTimeoutExpirationPolicy(1), true, serviceTicketSessionTrackingPolicy);
                        ticketRegistry.addTicket(st);
                        ticketRegistry.updateTicket(tgt);
                    });
                }
            }
This is {@link BaseJpaTicketRegistryCleanerTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-jpa-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/cleaner/BaseJpaTicketRegistryCleanerTests.java