@RepeatedTest(2)
    void verifyDeleteTicketsWithMultiplePGTs() throws Throwable {
        assumeTrue(canTicketRegistryDelete());
        FunctionUtils.doAndRetry(callback -> {
            val authentication = CoreAuthenticationTestUtils.getAuthentication();
            val ticketGrantingTicketId = TestTicketIdentifiers.generate().ticketGrantingTicketId();
            val serviceTicketId = TestTicketIdentifiers.generate().serviceTicketId();

            ticketRegistry.addTicket(new TicketGrantingTicketImpl(ticketGrantingTicketId, authentication, NeverExpiresExpirationPolicy.INSTANCE));
            val tgt = ticketRegistry.getTicket(ticketGrantingTicketId, TicketGrantingTicket.class);
            assertNotNull(tgt, "Ticket-granting ticket must not be null");
            val service = RegisteredServiceTestUtils.getService("TGT_DELETE_TEST");
            IntStream.range(1, 5).forEach(Unchecked.intConsumer(i -> {
                val st = (ProxyGrantingTicketIssuerTicket) tgt.grantServiceTicket(serviceTicketId + '-' + i, service,
                    NeverExpiresExpirationPolicy.INSTANCE, false, serviceTicketSessionTrackingPolicy);
                ticketRegistry.addTicket(st);
                ticketRegistry.updateTicket(tgt);

                val proxyGrantingTicketId = TestTicketIdentifiers.generate().proxyGrantingTicketId();
                val pgt = st.grantProxyGrantingTicket(proxyGrantingTicketId + '-' + i, authentication, NeverExpiresExpirationPolicy.INSTANCE);
                ticketRegistry.addTicket(pgt);
                ticketRegistry.updateTicket(tgt);
                ticketRegistry.updateTicket(st);
            }));

            val count = ticketRegistry.deleteTicket(ticketGrantingTicketId);
            assertEquals(9, count);
            return null;
        });
    }
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