@Test
    public void shouldHandleSacksConfusingToGroovy() throws Exception {
        final Graph graph = TinkerFactory.createModern();
        final GraphTraversalSource g = graph.traversal();
        final ScriptEngine engine = new GremlinGroovyScriptEngine();
        engine.put("g", g);
        List<Object> list = (List<Object>) engine.eval("g.withSack(1.0d,{it + 1}).V().sack().toList()");
        assertEquals(6, list.size());
        list = (List<Object>) engine.eval("g.withSack({1.0d},{it + 1}).V().sack().toList()");
        assertEquals(6, list.size());
        list = (List<Object>) engine.eval("g.withSack(1.0d,{x,y -> x + y + 1}).V().sack().toList()");
        assertEquals(6, list.size());
        list = (List<Object>) engine.eval("g.withSack({1.0d},{x,y -> x + y + 1}).V().sack().toList()");
        assertEquals(6, list.size());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-groovy/src/test/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngineOverGraphTest.java