@Test
    void verifyPolicy() throws Throwable {
        val expirationPolicy = new FixedInstantExpirationPolicy(Instant.now(Clock.systemUTC()));
        val result = SerializationUtils.serialize(expirationPolicy);
        val policyRead = SerializationUtils.deserialize(result, FixedInstantExpirationPolicy.class);
        assertEquals(expirationPolicy, policyRead);

        MAPPER.writeValue(JSON_FILE, expirationPolicy);
        val readPolicy = MAPPER.readValue(JSON_FILE, FixedInstantExpirationPolicy.class);
        assertEquals(expirationPolicy, readPolicy);
        
        assertNotEquals(0, expirationPolicy.getTimeToLive());

        val ticketGrantingTicket = new MockTicketGrantingTicket("casuser");
        assertNotNull(expirationPolicy.toMaximumExpirationTime(ticketGrantingTicket));
        expirationPolicy.setExpirationInstant(Instant.now(Clock.systemUTC()).minusSeconds(10));
        assertTrue(expirationPolicy.isExpired(ticketGrantingTicket));
    }
This is {@link FixedInstantExpirationPolicyTests}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/expiration/FixedInstantExpirationPolicyTests.java