@Test
        void verifyServiceAttributeDenyAllAttributes() throws Throwable {
            val policy = new DenyAllAttributeReleasePolicy();
            val p = mock(Principal.class);
            val map = new HashMap<String, List<Object>>();
            map.put("ATTR1", List.of(VALUE_1));
            map.put("ATTR2", List.of(VALUE_2));
            when(p.getAttributes()).thenReturn(map);
            when(p.getId()).thenReturn(PRINCIPAL_ID);
            val context = RegisteredServiceAttributeReleasePolicyContext.builder()
                .registeredService(CoreAttributesTestUtils.getRegisteredService())
                .service(CoreAttributesTestUtils.getService())
                .applicationContext(applicationContext)
                .principal(p)
                .build();
            val attr = policy.getAttributes(context);
            assertTrue(attr.isEmpty());
        }
Attribute filtering policy tests.

@author Misagh Moayyed
@since 4.0.0
core/cas-server-core-authentication-attributes/src/test/java/org/apereo/cas/services/RegisteredServiceAttributeReleasePolicyTests.java