@Test
    void verifyPrincipals() {
        val generator = redisKeyGeneratorFactory.getRedisKeyGenerator(Principal.class.getName()).orElseThrow();
        assertFalse(generator.isTicketKeyGenerator());
        val id = UUID.randomUUID().toString();
        val principalKey = generator.forId(id);
        assertNotNull(principalKey);
        assertTrue(principalKey.startsWith(generator.getNamespace()));
        assertTrue(principalKey.endsWith(id));
        val parsed = RedisKeyGenerator.parse(principalKey);
        assertEquals(generator.getNamespace(), parsed.getNamespace());
        assertEquals(id, parsed.getId());
    }
This is {@link DefaultRedisKeyGeneratorTests}.

@author Misagh Moayyed
@since 7.1.0
support/cas-server-support-redis-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/key/DefaultRedisKeyGeneratorTests.java