@Test
    void verifySsoParticipationByLastUsedTimePasses() {
        val state = mock(AuthenticationAwareTicket.class);
        when(state.getLastTimeUsed()).thenReturn(ZonedDateTime.now(ZoneOffset.UTC).plusSeconds(5));
        val chain = new ChainingRegisteredServiceSingleSignOnParticipationPolicy();
        chain.addPolicy(new LastUsedTimeRegisteredServiceSingleSignOnParticipationPolicy(TimeUnit.SECONDS, 10, 0));

        assertTrue(chain.shouldParticipateInSso(RegisteredServiceTestUtils.getRegisteredService(), state));
    }
This is {@link ChainingRegisteredServiceSingleSignOnParticipationPolicyTests}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/ChainingRegisteredServiceSingleSignOnParticipationPolicyTests.java