String dir = getRandomDir();
writeFile(dir, "GenerateHtml.stg", groupFile);
writeFile(dir, "HtmlTemplates.stg", htmlFile);
STGroup group = new STGroupFile(dir + "/GenerateHtml.stg", '$', '$');
// test html template directly
ST st = group.getInstanceOf("html");
Assert.assertNotNull(st);
String expected = "<table style=\"stuff\">";
String result = st.render();
assertEquals(expected, result);
// test from entry template
st = group.getInstanceOf("entry");
Assert.assertNotNull(st);
expected = "<table style=\"stuff\">";
result = st.render();
assertEquals(expected, result);
}