### Question:
MicaTemplate implements ApplicationContextAware, InitializingBean { public String render(String html) { return render(html, new HashMap<>(0)); } MicaTemplate(MicaLayTplProperties tplProperties, FmtFunc fmtFunc); String renderTpl(String tplName, Object data); String render(String html); String render(String html, Object data); @Override void afterPropertiesSet(); @Override void setApplicationContext(ApplicationContext applicationContext); ApplicationContext getApplicationContext();  }### Answer:
@Test public void test1() { Map<String, Object> data = new HashMap<>(); data.put("title", "mica"); String html = micaTemplate.render("<h3>{{ d.title }}</h3>", data); Assert.assertEquals(html, "<h3>mica</h3>"); }
@Test public void test2() { String html = "{{#\n" + "console.log();\n" + "console.log(\"im {}\", \"L.cm\");\n" + "console.error(\"hi im {}\", \"L.cm\");\n" + "console.log(fmt.format( d.date ));\n" + "console.log(\"laytpl version:{}\", laytpl.v);\n" + "}}"; Map<String, Object> data = new HashMap<>(); data.put("date", new Date()); micaTemplate.render(html, data); }
@Test public void test3() { String html = "{{!#1+1!}}"; String render = micaTemplate.render(html); Assert.assertEquals(render, "#1+1"); }