@Test
    public void shouldNotTimeoutStandaloneFunction() throws Exception {
        // use a super fast timeout which should not prevent the call of a cached function
        final ScriptEngine engine = new GremlinGroovyScriptEngine(new TimedInterruptGroovyCustomizer(1));
        engine.eval("def addItUp(x,y) { x + y }");

        assertEquals(3, engine.eval("addItUp(1,2)"));
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineTimedInterruptTest.java