@Test
    void verifyCachedTicket() throws Throwable {
        val originalAuthn = CoreAuthenticationTestUtils.getAuthentication();
        val generator = new TicketGrantingTicketIdGenerator(10, "redis");
        val ticket = new TicketGrantingTicketImpl(generator.getNewTicketId(TicketGrantingTicket.PREFIX),
            originalAuthn, NeverExpiresExpirationPolicy.INSTANCE);
        ticketRegistry.addTicket(ticket);
        var results = endpoint.fetchTicket(ticket.getId());
        assertTrue(results.getStatusCode().is2xxSuccessful());
        assertNotNull(ticketRegistry.getTicket(ticket.getId()));

        endpoint.invalidateTicket(ticket.getId());
        results = endpoint.fetchTicket(ticket.getId());
        assertTrue(results.getStatusCode().isSameCodeAs(HttpStatus.NOT_FOUND));
    }
This is {@link RedisTicketRegistryCacheEndpointTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-redis-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/RedisTicketRegistryCacheEndpointTests.java