public void testMapsAndLists() {
    OptimizerFactory.setDefaultOptimizer("ASM");

    ParserContext ctx = new ParserContext();
    ctx.setStrongTyping(true);
    ctx.addImport(HashMap.class);
    ctx.addImport(ArrayList.class);
    ctx.addInput("list",
        List.class);

    String expression = "m = new HashMap();\n" + "l = new ArrayList();\n" + "l.add(\"first\");\n" +
        "m.put(\"content\", l);\n" + "list.add(((ArrayList)m[\"content\"])[0]);";

    Serializable s = compileExpression(expression,
        ctx);

    Map vars = new HashMap();
    List list = new ArrayList();
    vars.put("list",
        list);

    Boolean result = (Boolean) executeExpression(s,
        vars);

    assertNotNull(result);
    assertTrue(result);
    assertEquals(1,
        list.size());
    assertEquals("first",
        list.get(0));
  }