@Test
public void testEvalMapsAndLists() {

    ScenarioContext ctx = getContext();
    Map<String, Object> testMap = new HashMap<>();
    testMap.put("foo", "bar");
    testMap.put("baz", 5);
    List<Integer> testList = new ArrayList<>();
    testList.add(1);
    testList.add(2);
    testMap.put("myList", testList);
    ctx.vars.put("myMap", testMap);
    String expression = "myMap.foo + myMap.baz";
    ScriptValue value = Script.evalJsExpression(expression, ctx);
    assertEquals(ScriptValue.Type.STRING, value.getType());
    assertEquals("bar5", value.getValue());
    value = Script.evalJsExpression("myMap.myList[0] + myMap.myList[1]", ctx);
    assertEquals(ScriptValue.Type.PRIMITIVE, value.getType());
    assertEquals(3.0, value.getValue());
}