@Test public void test_should_get_generated_string_from_named_template_with_placeholders_replaced() { final TemplateService templateService = new TemplateService(getMustacheEngine()); final Map<Object, Object> map = ImmutableMap.of("name", "foo"); final String generatedString = templateService.loadByName(TEMPLATE_NAME, map); assertEquals("This is a sample message with value foo.", generatedString); }
public String loadByName(String templateName, Map<Object, Object> map) { return templateEngine.getMustache(templateName).render(map); }
TemplateService { public String loadByName(String templateName, Map<Object, Object> map) { return templateEngine.getMustache(templateName).render(map); } }
TemplateService { public String loadByName(String templateName, Map<Object, Object> map) { return templateEngine.getMustache(templateName).render(map); } TemplateService(MustacheEngine templateEngine); }
TemplateService { public String loadByName(String templateName, Map<Object, Object> map) { return templateEngine.getMustache(templateName).render(map); } TemplateService(MustacheEngine templateEngine); String loadByName(String templateName, Map<Object, Object> map); }
TemplateService { public String loadByName(String templateName, Map<Object, Object> map) { return templateEngine.getMustache(templateName).render(map); } TemplateService(MustacheEngine templateEngine); String loadByName(String templateName, Map<Object, Object> map);  }