public void testStaticNestedWithMethodCall() {
    String expr = "item = new Item( \"Some Item\"); $msg.addItem( item ); return $msg";

    ParserContext context = new ParserContext();
    context.setStrictTypeEnforcement(false);

    context.addImport("Message",
        Message.class);
    context.addImport("Item",
        Item.class);
    //   Serializable compiledExpression = compiler.compileShared(context);

    Map vars = new HashMap();
    vars.put("$msg",
        new Message());
    ExpressionCompiler compiler = new ExpressionCompiler(expr, context);

    Message msg = (Message) executeExpression(compiler.compile(),
        vars);
    Item item = (Item) msg.getItems().get(0);
    assertEquals("Some Item",
        item.getName());
  }