HTMLTemplateEngine { public String process(String name, Object model) { var watch = new StopWatch(); try { HTMLTemplate template = templates.get(name); if (template == null) throw new Error("template not found, name=" + name); TemplateContext context = new TemplateContext(model, cdnManager); return template.process(context); } finally { logger.debug("process, name={}, elapsed={}", name, watch.elapsed()); } }  String process(String name, Object model); void add(String name, String template, Class<?> modelClass); void add(String classpath, Class<?> modelClass);  }
@Test void process() { engine.add("test", "<html><img c:src=\"imageURL\"></html>", TestModel.class); TestModel model = new TestModel(); model.imageURL = "http: String html = engine.process("test", model); assertThat(html).contains("<img src=http: }