@RepeatedTest(2)
    void verifyDeleteExpiredTicketById() throws Throwable {
        val expirationPolicy = new TicketGrantingTicketExpirationPolicy(42, 23);
        val ticketGrantingTicketId = TestTicketIdentifiers.generate().ticketGrantingTicketId();
        val ticketGrantingTicket = new TicketGrantingTicketImpl(ticketGrantingTicketId,
            CoreAuthenticationTestUtils.getAuthentication(), expirationPolicy);
        expirationPolicy.setClock(Clock.fixed(ticketGrantingTicket.getCreationTime().toInstant(), ZoneOffset.UTC));
        assertFalse(ticketGrantingTicket.isExpired());
        getNewTicketRegistry().addTicket(ticketGrantingTicket);
        ticketGrantingTicket.markTicketExpired();
        assertTrue(ticketGrantingTicket.isExpired());
        val deletedTicketCount = getNewTicketRegistry().deleteTicket(ticketGrantingTicket.getId());
        assertTrue(deletedTicketCount <= 1);
    }
This is {@link BaseTicketRegistryTests}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/registry/BaseTicketRegistryTests.java