@Test
    void verifyDefaultExpirationPolicy() throws Throwable {
        val svc = RegisteredServiceTestUtils.getRegisteredService("defaultExpirationPolicy", CasRegisteredService.class);
        servicesManager.save(svc);

        val factory = (ServiceTicketFactory) this.ticketFactory.get(ServiceTicket.class);
        val serviceTicket = factory.create(new MockTicketGrantingTicket("casuser"),
            RegisteredServiceTestUtils.getService("defaultExpirationPolicy"),
            true, ServiceTicket.class);
        assertNotNull(serviceTicket);
        assertEquals(10, serviceTicket.getExpirationPolicy().getTimeToLive());
    }
This is {@link DefaultServiceTicketFactoryTests}.

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