@Test
    void verifyNoMatch() throws Throwable {
        val filter = new MetadataRegistrationAuthorityAttributeReleasePolicy();
        filter.setRegistrationAuthority("^nothing.+");
        filter.setAllowedAttributes(List.of("sn"));

        val registeredService = SamlIdPTestUtils.getSamlRegisteredService();
        registeredService.setAttributeReleasePolicy(filter);
        val context = RegisteredServiceAttributeReleasePolicyContext.builder()
            .registeredService(registeredService)
            .applicationContext(applicationContext)
            .service(CoreAuthenticationTestUtils.getService())
            .principal(CoreAuthenticationTestUtils.getPrincipal("casuser", CollectionUtils.wrap("sn", "surname")))
            .build();
        val attributes = filter.getAttributes(context);
        assertTrue(attributes.isEmpty());
    }
This is {@link MetadataRegistrationAuthorityAttributeReleasePolicyTests}.

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