@Test
    void verifyCustomExpirationPolicy() throws Throwable {
        val factory = (TransientSessionTicketFactory) this.ticketFactory.get(TransientSessionTicket.class);
        val ticket = factory.create(RegisteredServiceTestUtils.getService("example"),
            CollectionUtils.wrap(ExpirationPolicy.class.getName(),
                HardTimeoutExpirationPolicy.builder().timeToKillInSeconds(60).build()));
        assertNotNull(ticket);
        assertEquals(60, ticket.getExpirationPolicy().getTimeToLive());
    }
This is {@link DefaultTransientSessionTicketFactoryTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/factory/DefaultTransientSessionTicketFactoryTests.java