@RepeatedTest(2)
    void verifyExpiration() throws Throwable {
        val ticketGrantingTicketId = TestTicketIdentifiers.generate().ticketGrantingTicketId();
        val serviceTicketId = TestTicketIdentifiers.generate().serviceTicketId();
        val authn = CoreAuthenticationTestUtils.getAuthentication();
        LOGGER.trace("Adding ticket [{}]", ticketGrantingTicketId);
        var addedTicket = ticketRegistry.addTicket(new TicketGrantingTicketImpl(ticketGrantingTicketId, authn, NeverExpiresExpirationPolicy.INSTANCE));
        LOGGER.trace("Getting ticket [{}]", addedTicket.getId());
        val tgt = ticketRegistry.getTicket(addedTicket.getId(), TicketGrantingTicket.class);
        assertNotNull(tgt, () -> "Ticket-granting ticket " + addedTicket.getId() + " cannot be fetched");
        val service = RegisteredServiceTestUtils.getService("TGT_DELETE_TEST");
        LOGGER.trace("Granting service ticket [{}]", serviceTicketId);
        val serviceTicket = (AbstractTicket) tgt.grantServiceTicket(serviceTicketId, service,
            NeverExpiresExpirationPolicy.INSTANCE, false, serviceTicketSessionTrackingPolicy);
        assertNotNull(serviceTicket, "Service ticket cannot be null");
        serviceTicket.setExpirationPolicy(AlwaysExpiresExpirationPolicy.INSTANCE);
        ticketRegistry.addTicket(serviceTicket);
        ticketRegistry.updateTicket(tgt);
        assertThrows(InvalidTicketException.class, () -> ticketRegistry.getTicket(serviceTicketId, ServiceTicket.class));
    }
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