@RepeatedTest(2)
    void verifyCountingTicketsForService() throws Throwable {
        assumeTrue(canTicketRegistryIterate());
        val authentication = CoreAuthenticationTestUtils.getAuthentication(UUID.randomUUID().toString());
        for (var i = 0; i < 10; i++) {
            val tgt = new TicketGrantingTicketImpl(
                TICKET_GRANTING_TICKET_ID_GENERATOR.getNewTicketId(TicketGrantingTicket.PREFIX),
                authentication,
                NeverExpiresExpirationPolicy.INSTANCE);
            val addedTicket = ticketRegistry.addTicket(tgt);
            val foundTgt = ticketRegistry.getTicket(addedTicket.getId(), TicketGrantingTicket.class);
            assertNotNull(foundTgt);

            val service = i % 2 == 0 ? RegisteredServiceTestUtils.getService() : RegisteredServiceTestUtils.getService2();
            val serviceTicket = foundTgt.grantServiceTicket("ST-%s".formatted(RandomUtils.generateSecureRandomId()),
                service, NeverExpiresExpirationPolicy.INSTANCE, false, serviceTicketSessionTrackingPolicy);
            ticketRegistry.updateTicket(foundTgt);
            ticketRegistry.addTicket(serviceTicket);
        }
        assertEquals(5, ticketRegistry.countTicketsFor(RegisteredServiceTestUtils.getService()));
    }
Exercise block of code in {@link AbstractTicketRegistry#getTicket(String ticketId)} that runs when
the method encounters a {@link Ticket} created in the future.
Adds 10 seconds to creation time to simulate time out of sync so warning will be logged.
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/registry/BaseTicketRegistryTests.java