@Test
    void verifyAllMustMatch() throws Throwable {
        val policy = new ReturnMappedAttributeReleasePolicy();
        val mappedAttr = ArrayListMultimap.<String, Object>create();
        mappedAttr.put("cn", "common-name");
        policy.setAllowedAttributes(CollectionUtils.wrap(mappedAttr));

        val criteria = new AttributeBasedRegisteredServiceAttributeReleaseActivationCriteria();
        criteria.setRequiredAttributes(Map.of("memberOf", List.of("ad.+|sys.+"), "mail", List.of(".+@example.org")));
        criteria.setOperator(LogicalOperatorTypes.AND);
        policy.setActivationCriteria(criteria);

        val attributes = getAttributesFromPolicy(policy);
        assertTrue(attributes.containsKey("common-name"));
    }
This is {@link AttributeBasedRegisteredServiceAttributeReleaseActivationCriteriaTests}.

@author Misagh Moayyed
@since 7.1.0
core/cas-server-core-services-api/src/test/java/org/apereo/cas/services/AttributeBasedRegisteredServiceAttributeReleaseActivationCriteriaTests.java