public void testDynamicImportsInList() {
    ParserContext ctx = new ParserContext();
    ctx.addPackageImport("org.mvel2.tests.core.res");

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