@Test
public void testCallingFunctionWithJsonArray() {

    ScenarioContext ctx = getContext();
    Script.assign("foo", "function(a){ return a[0] }", ctx);
    Script.assign("bar", "call foo ['hello']", ctx);
    ScriptValue bar = ctx.vars.get("bar");
    assertEquals("hello", bar.getValue());
}