@Test
        void verifyOperation() throws Throwable {
            val policy = new OidcPhoneScopeAttributeReleasePolicy();
            assertEquals(OidcConstants.StandardScopes.PHONE.getScope(), policy.getScopeType());
            assertNotNull(policy.getAllowedAttributes());
            val principal = CoreAuthenticationTestUtils.getPrincipal(CollectionUtils.wrap("phone_number_verified", List.of("12134321245"),
                "phone_number", List.of("12134321245")));

            val registeredService = getOidcRegisteredService(UUID.randomUUID().toString(), randomServiceUrl());
            registeredService.setAttributeReleasePolicy(policy);
            val releasePolicyContext = RegisteredServiceAttributeReleasePolicyContext
                .builder()
                .registeredService(registeredService)
                .service(CoreAuthenticationTestUtils.getService())
                .principal(principal)
                .applicationContext(applicationContext)
                .build();
            val attrs = policy.getAttributes(releasePolicyContext);
            assertTrue(policy.getAllowedAttributes().stream().allMatch(attrs::containsKey));
            assertTrue(policy.determineRequestedAttributeDefinitions(releasePolicyContext).containsAll(policy.getAllowedAttributes()));
        }
This is {@link OidcPhoneScopeAttributeReleasePolicyTests}.

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