@Test
    void verifyExpiredTicketOperation() throws Throwable {
        val config = new SAML2Configuration();
        val client = new SAML2Client(config);
        val ticket = delegatedClientAuthenticationWebflowManager.store(requestContext, context, client);
        assertNotNull(ticketRegistry.getTicket(ticket.getId()));
        assertEquals(ticket.getId(), delegatedClientDistributedSessionStore.get(context,
            SAML2StateGenerator.SAML_RELAY_STATE_ATTRIBUTE).get());
        requestContext.setParameter("RelayState", ticket.getId());
        ticket.markTicketExpired();
        assertThrows(UnauthorizedServiceException.class,
            () -> delegatedClientAuthenticationWebflowManager.retrieve(requestContext, context, client));
    }
This is {@link DefaultDelegatedClientAuthenticationWebflowManagerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-pac4j-saml/src/test/java/org/apereo/cas/web/saml2/DefaultDelegatedClientAuthenticationWebflowManagerTests.java