@Test
    void verifyTicketTTLWithRememberMe() throws Throwable {
        val authentication = CoreAuthenticationTestUtils.getAuthentication(
            this.principalFactory.createPrincipal("test"),
            Map.of(
                RememberMeCredential.AUTHENTICATION_ATTRIBUTE_REMEMBER_ME, List.of(true)));
        val t = new TicketGrantingTicketImpl("111", authentication, this.expirationPolicy);
        assertEquals(REMEMBER_ME_TTL, expirationPolicy.getTimeToLive(t));
    }
Factory to create the principal type.
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/expiration/RememberMeDelegatingExpirationPolicyTests.java