@Test
    void verifyGroovyExecutionFails() {
        var result = ScriptingUtils.executeGroovyShellScript(mock(Script.class), CollectionUtils.wrap("name", "casuser"), String.class);
        assertNull(result);

        result = ScriptingUtils.executeGroovyScript(mock(Resource.class), "someMethod", String.class);
        assertNull(result);

        result = ScriptingUtils.executeGroovyScript(mock(Resource.class), null, String.class);
        assertNull(result);

        assertNull(ScriptingUtils.parseGroovyShellScript(null));

        assertThrows(RuntimeException.class,
            () -> ScriptingUtils.executeGroovyScript(mock(Resource.class), "someMethod",
                ArrayUtils.EMPTY_OBJECT_ARRAY, String.class, true));
    }
This is {@link ScriptingUtilsTests}.

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