@Test
    void checkInitialAttributes() throws Throwable {
        val principal = PrincipalFactoryUtils.newPrincipalFactory()
            .createPrincipal("uid", Map.of("mail", List.of("final@example.com")));
        val rep = new DefaultPrincipalAttributesRepository();
        val context = RegisteredServiceAttributeReleasePolicyContext.builder()
            .applicationContext(applicationContext)
            .principal(principal)
            .registeredService(CoreAuthenticationTestUtils.getRegisteredService())
            .build();
        assertEquals(1, rep.getAttributes(context).size());
        assertTrue(rep.getAttributes(context).containsKey("mail"));
    }
Handles tests for {@link DefaultPrincipalAttributesRepository}.

@author Misagh Moayyed
@since 4.1
support/cas-server-support-person-directory/src/test/java/org/apereo/cas/DefaultPrincipalAttributesRepositoryTests.java