@Test
    void verifyNoRelease() {
        val policy = new DefaultAuthenticationAttributeReleasePolicy("authnContext");
        val service = CoreAuthenticationTestUtils.getRegisteredService();
        val attrPolicy = new ReturnAllowedAttributeReleasePolicy();
        attrPolicy.setAuthorizedToReleaseAuthenticationAttributes(false);
        when(service.getAttributeReleasePolicy()).thenReturn(attrPolicy);
        assertTrue(policy.getAuthenticationAttributesForRelease(CoreAuthenticationTestUtils.getAuthentication(),
            mock(Assertion.class), Map.of(), service).isEmpty());
        assertTrue(policy.getAuthenticationAttributesForRelease(CoreAuthenticationTestUtils.getAuthentication(), service).isEmpty());
    }
This is {@link DefaultAuthenticationAttributeReleasePolicyTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-authentication-attributes/src/test/java/org/apereo/cas/authentication/DefaultAuthenticationAttributeReleasePolicyTests.java