}
@Test
public final void testRender() throws IOException, MandrillApiError {
final String code = "<html><body><h1>Hello *|MERGE1|*!</h1></body></html>";
MandrillTemplate t = mandrillApi.templates().add(templateName,
code, false);
Assert.assertNotNull(t);
final HashMap<String, String> content = new HashMap<String,String>();
content.put("editable", "<div>foo *|MERGE2|*</div>");
final HashMap<String, String> mergeVars = new HashMap<String, String>();
mergeVars.put("merge1", "Lutung");
mergeVars.put("merge2", "bar");
final String rendered = mandrillApi.templates().render(
t.getName(), content, mergeVars);
Assert.assertNotNull(rendered);
Assert.assertEquals(code.replace("*|MERGE1|*", "Lutung"), rendered);
}