@Test
    void verifyTgtIsExpiredByHardTimeOut() {
        val creationTime = ticketGrantingTicket.getCreationTime();

        expirationPolicy.setClock(Clock.fixed(creationTime.plusSeconds(HARD_TIMEOUT).minusNanos(1).toInstant(), ZoneOffset.UTC));
        ticketGrantingTicket.grantServiceTicket(TGT_ID, RegisteredServiceTestUtils.getService(),
            expirationPolicy, false, serviceTicketSessionTrackingPolicy);
        assertFalse(ticketGrantingTicket.isExpired());

        expirationPolicy.setClock(Clock.fixed(creationTime.plusSeconds(HARD_TIMEOUT).plusNanos(1).toInstant(), ZoneOffset.UTC));
        assertTrue(ticketGrantingTicket.isExpired());
    }
Test cases for {@link TicketGrantingTicketExpirationPolicy}.

@author William G. Thompson, Jr.
@since 3.4.10
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/expiration/TicketGrantingTicketExpirationPolicyTests.java