@Test public void testCompileHandlebarsTemplate() throws Exception { TemplateFactory templateFactory = new TemplateFactory(); Template compiled = templateFactory.compileHandlebarsTemplate(TEMPLATE); String result = compiled.apply(createContext()); assertThat(result, is(EXPECTED_RESULT)); }
public Template compileHandlebarsTemplate(String template) { try { return handlebars.compileInline(template); } catch (IOException e) { throw new TemplateException("Error compiling handlebars template: " + template, e); } }
TemplateFactory { public Template compileHandlebarsTemplate(String template) { try { return handlebars.compileInline(template); } catch (IOException e) { throw new TemplateException("Error compiling handlebars template: " + template, e); } } }
TemplateFactory { public Template compileHandlebarsTemplate(String template) { try { return handlebars.compileInline(template); } catch (IOException e) { throw new TemplateException("Error compiling handlebars template: " + template, e); } }  }
TemplateFactory { public Template compileHandlebarsTemplate(String template) { try { return handlebars.compileInline(template); } catch (IOException e) { throw new TemplateException("Error compiling handlebars template: " + template, e); } }  String handlebars(String template, Object context); Template compileHandlebarsTemplate(String template); }
TemplateFactory { public Template compileHandlebarsTemplate(String template) { try { return handlebars.compileInline(template); } catch (IOException e) { throw new TemplateException("Error compiling handlebars template: " + template, e); } }  String handlebars(String template, Object context); Template compileHandlebarsTemplate(String template);  }