@Test
    void verifyAttributeRelease() throws Throwable {

        val service = RegisteredServiceTestUtils.getRegisteredService("verifyAttributeRelease");
        val policy = new CustomNamespaceWSFederationClaimsReleasePolicy(
            CollectionUtils.wrap(WSFederationClaims.COMMON_NAME.getClaim(), "cn",
                WSFederationClaims.EMAIL_ADDRESS.getClaim(), "email"));
        val principal = CoreAuthenticationTestUtils.getPrincipal("casuser",
            CollectionUtils.wrap("cn", "casuser", "email", "cas@example.org"));
        val releasePolicyContext = RegisteredServiceAttributeReleasePolicyContext.builder()
            .registeredService(service)
            .applicationContext(applicationContext)
            .service(CoreAuthenticationTestUtils.getService())
            .principal(principal)
            .build();
        var results = policy.getAttributes(releasePolicyContext);
        assertSame(2, results.size());
        assertTrue(results.containsKey(WSFederationConstants.HTTP_SCHEMAS_APEREO_CAS.concat(WSFederationClaims.COMMON_NAME.getClaim())));
        assertTrue(results.containsKey(WSFederationConstants.HTTP_SCHEMAS_APEREO_CAS.concat(WSFederationClaims.EMAIL_ADDRESS.getClaim())));
    }
This is {@link CustomNamespaceWSFederationClaimsReleasePolicyTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-ws-idp-api/src/test/java/org/apereo/cas/ws/idp/services/CustomNamespaceWSFederationClaimsReleasePolicyTests.java