@Test
    void verifyOperation() throws Throwable {
        val policy = new OidcScopeFreeAttributeReleasePolicy(List.of("family_name", "food"));
        assertEquals(OidcScopeFreeAttributeReleasePolicy.ANY_SCOPE, policy.getScopeType());
        assertNotNull(policy.getAllowedAttributes());
        assertFalse(policy.claimsMustBeDefinedViaDiscovery());

        val principal = CoreAuthenticationTestUtils.getPrincipal(UUID.randomUUID().toString(),
            CollectionUtils.wrap("name", List.of("cas"),
                "profile", List.of("test"),
                "food", List.of("salad"),
                "family_name", List.of("johnson")));

        val releasePolicyContext = RegisteredServiceAttributeReleasePolicyContext.builder()
            .registeredService(CoreAuthenticationTestUtils.getRegisteredService())
            .service(CoreAuthenticationTestUtils.getService())
            .principal(principal)
            .applicationContext(oidcConfigurationContext.getApplicationContext())
            .build();
        val attrs = policy.getAttributes(releasePolicyContext);
        assertEquals(2, attrs.size());
        assertTrue(policy.getAllowedAttributes().containsAll(attrs.keySet()));
    }
This is {@link OidcScopeFreeAttributeReleasePolicyTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/claims/OidcScopeFreeAttributeReleasePolicyTests.java