@Test
    void verifyMatch() throws Throwable {
        val filter = new InCommonRSAttributeReleasePolicy();
        val registeredService = SamlIdPTestUtils.getSamlRegisteredService();
        registeredService.setAttributeReleasePolicy(filter);
        val context = RegisteredServiceAttributeReleasePolicyContext.builder()
            .registeredService(registeredService)
            .applicationContext(applicationContext)
            .service(CoreAuthenticationTestUtils.getService())
            .principal(CoreAuthenticationTestUtils.getPrincipal("casuser",
                CollectionUtils.wrap("eduPersonPrincipalName", "cas-eduPerson-user",
                    "mail", "cas@example.org",
                    "sn", "surname")))
            .build();
        val attributes = filter.getAttributes(context);
        assertFalse(attributes.isEmpty());
        assertTrue(attributes.containsKey("eduPersonPrincipalName"));
        assertTrue(attributes.containsKey("mail"));
        assertTrue(attributes.containsKey("sn"));
    }
This is {@link InCommonRSAttributeReleasePolicyTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/services/InCommonRSAttributeReleasePolicyTests.java