### Question:
DMNDocumentationServiceImpl implements DMNDocumentationService { @Override public DocumentationOutput buildDocumentation(final HTMLDocumentationTemplate template, final DMNDocumentation diagramDocumentation) { final String rendered = mustacheTemplateRenderer.render(template.getTemplate(), diagramDocumentation); return new DocumentationOutput(rendered); } @Inject  DMNDocumentationServiceImpl(final ClientMustacheTemplateRenderer mustacheTemplateRenderer,
                                       final DMNDocumentationFactory dmnDocumentationFactory); @Override DMNDocumentation processDocumentation(final Diagram diagram); @Override HTMLDocumentationTemplate getDocumentationTemplate(); @Override DocumentationOutput buildDocumentation(final HTMLDocumentationTemplate template,
                                                  final DMNDocumentation diagramDocumentation); @Override DocumentationOutput generate(final Diagram diagram);  }### Answer:
@Test public void testBuildDocumentation() { final HTMLDocumentationTemplate template = mock(HTMLDocumentationTemplate.class); final DMNDocumentation documentation = mock(DMNDocumentation.class); final String documentationTemplate = "documentationTemplate"; final String rendered = "<template rendered='true' />"; final DocumentationOutput expectedOutput = new DocumentationOutput(rendered); when(template.getTemplate()).thenReturn(documentationTemplate); when(mustacheTemplateRenderer.render(documentationTemplate, documentation)).thenReturn(rendered); final DocumentationOutput actualOutput = service.buildDocumentation(template, documentation); assertEquals(expectedOutput.getValue(), actualOutput.getValue()); }