@Test
    void verifyDefaultExpirationPolicy() throws Throwable {
        val defaultSvc = RegisteredServiceTestUtils.getRegisteredService("defaultExpirationPolicy", CasRegisteredService.class);
        servicesManager.save(defaultSvc);
        val tgt = new MockTicketGrantingTicket("casuser");
        val service = RegisteredServiceTestUtils.getService("defaultExpirationPolicy");
        val pgtFactory = (ProxyGrantingTicketFactory) ticketFactory.get(ProxyGrantingTicket.class);
        val pgt = pgtFactory.create(new MockServiceTicket("123456", service, tgt),
            RegisteredServiceTestUtils.getAuthentication());
        val factory = (ProxyTicketFactory) ticketFactory.get(ProxyTicket.class);
        val ticket = factory.create(pgt, service);
        assertNotNull(ticket);
        assertEquals(10, ticket.getExpirationPolicy().getTimeToLive());
    }
This is {@link DefaultProxyTicketFactoryTests}.

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