@Test
    void verifyGroovyMappingInline() throws Throwable {
        ApplicationContextProvider.holdApplicationContext(oidcConfigurationContext.getApplicationContext());
        val policy = new OidcCustomScopeAttributeReleasePolicy("groups", CollectionUtils.wrap("groups"));
        policy.setClaimMappings(Map.of("groups", "groovy { return attributes['groups'] }"));
        val principal = CoreAuthenticationTestUtils.getPrincipal(CollectionUtils.wrap("groups", List.of("admin", "user")));
        val oidcRegisteredService = getOidcRegisteredService();
        oidcRegisteredService.setAttributeReleasePolicy(policy);
        
        val releasePolicyContext = RegisteredServiceAttributeReleasePolicyContext.builder()
            .registeredService(oidcRegisteredService)
            .service(CoreAuthenticationTestUtils.getService())
            .applicationContext(applicationContext)
            .principal(principal)
            .build();
        val attrs = policy.getAttributes(releasePolicyContext);
        assertEquals(List.of("admin", "user"), attrs.get("groups"));
    }
This is {@link OidcCustomScopeAttributeReleasePolicyTests}.

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