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

    ExpressionCompiler compiler = new ExpressionCompiler("[ 'bobba' : new User('Bobba', 'Feta') ]", ctx);
    Map map = (Map) executeExpression(compiler.compile());
    User user = (User) map.get("bobba");
    assertEquals("Bobba",
        user.getFirstName());
  }