ExpressionBuilder { public ExpressionHolder build() { Expression expression = buildExpression(); Type returnType = returnType(token, context.rootClass); return new ExpressionHolder(expression, returnType, expressionSource, location); } ExpressionBuilder(String expressionSource, TemplateMetaContext context, String location); ExpressionHolder build();  }
@Test void eval() { TemplateMetaContext context = new TemplateMetaContext(TestModel.class); TestModel root = new TestModel(); root.stringField = "value"; root.mapListField = Map.of("key", List.of(1)); ExpressionHolder expression = new ExpressionBuilder("stringField", context, null).build(); assertThat(expression.eval(new TemplateContext(root, null))) .isEqualTo(root.stringField); expression = new ExpressionBuilder("mapListField.get(\"key\")", context, null).build(); assertThat(expression.eval(new TemplateContext(root, null))) .isEqualTo(root.mapListField.get("key")); }