@Test
        void verifyOperation() {
            val script =
                """
                    def logger = (Logger) binding.getVariable('logger')
                    def attributes = (Map) binding.getVariable('attributes')
                    logger.info('Attributes: {}', attributes)
                    
                    if ((attributes.get('entitlement') as List).contains('admin')) {
                        return [(attributes['uid'] as List).get(0).toString().toUpperCase()]
                    } else {
                        return attributes['identifier'] as List
                    }
                    """;
            val scriptFactory = ExecutableCompiledScriptFactory.getExecutableCompiledScriptFactory();
            val shellScript = scriptFactory.fromScript(script.stripIndent());

            val attributes1 = new HashMap<String, Object>();
            attributes1.put("entitlement", List.of("admin"));
            attributes1.put("uid", List.of("casadmin"));
            attributes1.put("identifier", List.of("1984"));
            new RunnableScript(attributes1, shellScript, "CASADMIN").run();
        }
This is {@link GroovyShellScriptTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-scripting/src/test/java/org/apereo/cas/util/GroovyShellScriptTests.java