@Test
public void testCallingFunctionWithJavaList() {

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