@Test
public void javaListToJavaScriptArray() throws ScriptException {

    ArrayList<Object> list = new ArrayList<Object>();
    list.add("boo");
    list.add("yah");
    list.add("foo");
    list.add("bar");
    scope.put("list", list);
    assertThat(new JavaScript("test","list").exec(scope)).isEqualTo(list);
    assertThat(new JavaScript("test","list.length == 4").exec(scope)).isEqualTo(true);
    assertThat(new JavaScript("test","list[2] == 'foo'").exec(scope)).isEqualTo(true);
}