### Question:
TemplateNarrativeGenerator implements INarrativeGenerator { public String processLiquid(FhirContext theContext, String theTemplate, IBaseResource theResource) { Template template = Template.parse(theTemplate); ourLog.info(template.toStringAST()); IWorkerContext ctx = new HapiWorkerContext(myFhirContext, myValidationSupport); FluentPathEngine fluentPathEngine = new FluentPathEngine(ctx); FhirTerser terser = new FhirTerser(theContext); HashMap<String, Object> context = new HashMap<String, Object>(); context.put("context", theResource); context.put("terser", terser); context.put("fpEngine", fluentPathEngine); return template.render(context); }  @Override void generateNarrative(FhirContext theContext, IBaseResource theResource, INarrative theNarrative); String processLiquid(FhirContext theContext, String theTemplate, IBaseResource theResource);  }### Answer:
@Test public void testTemplate() throws Exception { String template = IOUtils.toString(getClass().getResourceAsStream("/patient.narrative"), StandardCharsets.UTF_8); Patient input = new Patient(); input.addName().addFamily("LNAME1"); input.addName().addFamily("LNAME2"); input.addName().addGiven("FNAME1"); input.addName().addGiven("FNAME2"); TemplateNarrativeGenerator gen = new TemplateNarrativeGenerator(); String output = gen.processLiquid(FhirContext.forDstu3(), template, input); ourLog.info(output); }