@Test
    void verifyOperation() {
        val repo1 = new DefaultPrincipalAttributesRepository();
        repo1.setAttributeRepositoryIds(Set.of(UUID.randomUUID().toString()));
        val repo2 = new DefaultPrincipalAttributesRepository();
        repo2.setAttributeRepositoryIds(Set.of(UUID.randomUUID().toString()));

        val chain = new ChainingPrincipalAttributesRepository(List.of(repo1, repo2));
        val context = RegisteredServiceAttributeReleasePolicyContext
            .builder()
            .applicationContext(applicationContext)
            .principal(CoreAuthenticationTestUtils.getPrincipal())
            .registeredService(CoreAuthenticationTestUtils.getRegisteredService())
            .build();

        val attributes = chain.getAttributes(context);
        assertNotNull(attributes);
        assertEquals(2, chain.getAttributeRepositoryIds().size());
        assertDoesNotThrow(() -> chain.update(CoreAuthenticationTestUtils.getPrincipal().getId(),
            CoreAuthenticationTestUtils.getPrincipal().getAttributes(), context));
    }
This is {@link ChainingPrincipalAttributesRepositoryTests}.

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