private static Map<String, List<Object>> fetchAttributeValueAsInlineGroovyScript(final String attributeName,
                                                                                     final Map<String, List<Object>> resolvedAttributes,
                                                                                     final String inlineGroovy) {
        return ApplicationContextProvider.getScriptResourceCacheManager()
            .map(cacheMgr -> FunctionUtils.doUnchecked(() -> {
                val script = cacheMgr.resolveScriptableResource(inlineGroovy, attributeName, inlineGroovy);
                return fetchAttributeValueFromScript(script, attributeName, resolvedAttributes);
            }))
            .orElseThrow(() -> new RuntimeException("No groovy script cache manager is available to execute attribute mappings"));
    }
This is {@link DefaultPrincipalAttributesMapper}.

@author Misagh Moayyed
@since 6.6.0
core/cas-server-core-authentication-attributes/src/main/java/org/apereo/cas/authentication/DefaultPrincipalAttributesMapper.java