@Test
    void verifyNoExpirationPolicy() throws Throwable {
        val service = RegisteredServiceTestUtils.getService("noExpirationPolicy");
        val factory = (TicketGrantingTicketFactory) ticketFactory.get(TicketGrantingTicket.class);
        val tgt = factory.create(RegisteredServiceTestUtils.getAuthentication(), service);
        val seconds = Beans.newDuration(casProperties.getTicket().getTgt().getPrimary().getMaxTimeToLiveInSeconds()).toSeconds();
        assertEquals(seconds, tgt.getExpirationPolicy().getTimeToLive());
    }
This is {@link DefaultTicketGrantingTicketFactoryTests}.

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