ParserContext ctx = new ParserContext();
ctx.setStrictTypeEnforcement(false);
ctx.setStrongTyping(false);
ctx.addImport(Foo.class);
ExpressionCompiler compiler = new ExpressionCompiler("new Foo244( $bar, $bar.age );");
Serializable compiled = compiler.compile(ctx);
Set<String> requiredInputs = compiler.getParserContextState().getInputs().keySet();
assertEquals(1, requiredInputs.size());
assertTrue(requiredInputs.contains("$bar"));
}