public void testListNestedInsideList() {
    ParserContext ctx = new ParserContext();
    ctx.addImport("User",
        User.class);

    ExpressionCompiler compiler =
        new ExpressionCompiler("users = [ new User('Darth', 'Vadar'), " +
            "new User('Bobba', 'Feta') ]; [ users.get( 0 ), users.get( 1 ) ]", ctx);
    List list = (List) executeExpression(compiler.compile(),
        new HashMap());
    User user = (User) list.get(0);
    assertEquals("Darth",
        user.getFirstName());
    user = (User) list.get(1);
    assertEquals("Bobba",
        user.getFirstName());

    compiler = new ExpressionCompiler("users = [ new User('Darth', 'Vadar'), " +
        "new User('Bobba', 'Feta') ]; [ users[0], users[1] ]", ctx);
    list = (List) executeExpression(compiler.compile(),
        new HashMap());
    user = (User) list.get(0);
    assertEquals("Darth",
        user.getFirstName());
    user = (User) list.get(1);
    assertEquals("Bobba",
        user.getFirstName());
  }