@Test
    void verifyNoAuthnRequest() {
        val filter = new AuthnRequestRequestedAttributesAttributeReleasePolicy();
        filter.setAllowedAttributes(List.of("eduPersonPrincipalAttribute"));
        filter.setUseFriendlyName(true);

        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", "casuser")))
            .build();
        assertThrows(MissingSamlAuthnRequestException.class, () -> filter.getAttributes(context));
    }
This is {@link AuthnRequestRequestedAttributesAttributeReleasePolicyTests}.

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