// TODO split call & format
public void testCall() {
Hashtable<String,String[]> h = new Hashtable<String,String[]>();
h.put("list", new String[] { "a", "b" });
TemplatesFacade env = new TestTemplatesFacade(new DefaultNavigationFactory(), new ClassTemplateLoader(getClass().getClassLoader(), TEMPLATES_LOCATION, TEMPLATES_CHARSET));
EvaluationContext context = new EvaluationContext(h);
context.setVariable("util", new DefaultStaticMethods());
// test 1
String q = env.executeTemplate("format.callTempl", context, null, null);
Assert.assertEquals("\nstatic int a[] {\n 0,\n1,\n2,\n3\n};\n\n", q);
// test 2
q = env.executeTemplate("format.useformat", context, null, null);
Assert.assertEquals("\nstatic int a[] {\n 1,2,aa,4,5,\n6,7,8,9,10,\n11,12,13,14,\n15,16,17,19,\n20,21,22,23,\n24,25\n};\n\n", q);
// test 3
q = env.executeTemplate("format.useCall2", context, null, null);
Assert.assertEquals("Table is mine\n", q);
// test 4
q = env.executeTemplate("format.useCall3", context, null, null);
Assert.assertEquals("site is mine\n", q);
}