@Test
    void verifyMatchingScopeWithPolicy() {
        var service = getOidcRegisteredService();
        val initialPolicy = new OidcPhoneScopeAttributeReleasePolicy();
        initialPolicy.setClaimMappings(Map.of("phone", "my_phone"));
        service.setAttributeReleasePolicy(initialPolicy);
        val scopes = service.getScopes();
        scopes.add(OidcConstants.StandardScopes.PHONE.getScope());
        scopes.add(OidcConstants.StandardScopes.PROFILE.getScope());
        service = (OidcRegisteredService) oidcServiceRegistryListener.postLoad(service);
        val policy = service.getAttributeReleasePolicy();
        assertInstanceOf(RegisteredServiceChainingAttributeReleasePolicy.class, policy);
        val chain = (RegisteredServiceChainingAttributeReleasePolicy) policy;
        assertEquals(3, chain.size());
    }
This is {@link OidcServiceRegistryListenerTests}.

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