MustacheFactory c = new DefaultMustacheFactory(root);
Mustache m = c.compile("translatebundle.html");
StringWriter sw = new StringWriter();
Map<String, Object> scope = new HashMap<String, Object>();
scope.put("trans", new TranslateBundleFunction(BUNDLE, Locale.US));
m.execute(sw, scope);
assertEquals(getContents(root, "translatebundle.txt"), sw.toString());
}
protected String getContents(File root, String file) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(root, file)),"UTF-8"));