@Test
    void verifyOperation() {
        val chain = new ChainingRegisteredServiceConsentPolicy();
        chain.addPolicies(List.of(new DefaultRegisteredServiceConsentPolicy(Set.of("cn"), Set.of("givenName"))));
        chain.addPolicy(new DefaultRegisteredServiceConsentPolicy(Set.of("mail"), Set.of("address")));
        assertTrue(chain.getStatus().isUndefined());
        assertEquals(Set.of("cn", "mail"), chain.getExcludedAttributes());
        assertEquals(Set.of("givenName", "address"), chain.getIncludeOnlyAttributes());
    }
This is {@link ChainingRegisteredServiceConsentPolicyTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-authentication-attributes/src/test/java/org/apereo/cas/services/consent/ChainingRegisteredServiceConsentPolicyTests.java