### Question:
HandlebarsTemplateService implements TemplateService { @Override public Map<String,String> renderMultipart(String templateId, Object context) { String content = render(templateId,context); Map<String,String>multipartContent=parseSections(content); return multipartContent; } HandlebarsTemplateService(String prefix,int cacheSize); void registerHelpers(Map<String,Helper<? extends Object>>helpers); @Override String render(String templateId, Object context); @Override void render(String templateId, Object context, Writer output); @Override Map<String,String> renderMultipart(String templateId, Object context); static final String SERVICE_NAME; }### Answer:
@Test public void testRenderMultipartTemplateFromClasspath() { Map<String,Object>context2=context.entrySet() .stream() .collect(Collectors.toMap(Map.Entry::getKey, e->e.getValue())); Map<String,String> template = service.renderMultipart("test-multipart-template", context2); assertEquals("Unsectioned", template.get(TemplateService.UNSECTIONED_CONTENT)); assertEquals("This is section 1 test-value", template.get("section1")); assertEquals("This is section 2\n", template.get("section2")); }