@Test
    void verifyTicketExpirationWithRememberMe() 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);
        assertFalse(t.isExpired());
        t.grantServiceTicket("55", RegisteredServiceTestUtils.getService(),
            this.expirationPolicy, false, serviceTicketSessionTrackingPolicy);
        assertTrue(t.isExpired());
    }
Factory to create the principal type.
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/expiration/RememberMeDelegatingExpirationPolicyTests.java