### Question:
DMNDocumentationFactory { protected String getDiagramImage() { return getCanvasHandler() .map(canvasFileExport::exportToPng) .orElse(EMPTY); } @Inject  DMNDocumentationFactory(final CanvasFileExport canvasFileExport,
                                   final TranslationService translationService,
                                   final DMNDocumentationDRDsFactory drdsFactory,
                                   final SessionInfo sessionInfo,
                                   final DMNGraphUtils graphUtils); DMNDocumentation create(final Diagram diagram);  }### Answer:
@Test public void testGetDiagramImageWhenCanvasHandlerIsNotPresent() { when(graphUtils.getCurrentSession()).thenReturn(Optional.empty()); assertEquals(EMPTY, documentationFactory.getDiagramImage()); }