public void testEarlyEvalOfMapInIfExprPassInHashMap() throws Exception {
String templates =
"main(m,x) ::= << p<x>t: <m.({p<x>t})>, <if(m.({p<x>t}))>if<else>else<endif> >>\n";
writeFile(tmpdir, "t.stg", templates);
STGroup group = new STGroupFile(tmpdir + "/t.stg");
ST st = group.getInstanceOf("main");
st.add("m", new HashMap<String, String>() {{put("parrt","value");}});
st.add("x", null);
String s = st.render();
Assert.assertEquals(" pt: , else ", s); // m[null] has no default value so else clause