@Test
    void verifyClean() throws Throwable {
        val ticket = new MockTicketGrantingTicket(UUID.randomUUID().toString());
        ticketRegistry.addTicket(ticket);
        assertNotNull(ticketRegistry.getTicket(ticket.getId()));
        ticket.markTicketExpired();
        val results = (Map) ticketRegistryEndpoint.clean().getBody();
        assertNotNull(results);
        assertTrue(results.containsKey("removed"));
        assertTrue(results.containsKey("total"));
        assertTrue(results.containsKey("duration"));
        assertTrue(results.containsKey("startTime"));
        assertTrue(results.containsKey("endTime"));
    }
This is {@link TicketRegistryEndpointTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-reports/src/test/java/org/apereo/cas/web/report/TicketRegistryEndpointTests.java