### Question:
DMNDocumentationFactory { protected boolean hasGraphNodes(final Diagram diagram) { return !graphUtils.getDRGElements(diagram).isEmpty(); } @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 testGetHasGraphNodesWhenIsReturnsFalse() { when(graphUtils.getDRGElements(diagram)).thenReturn(emptyList()); assertFalse(documentationFactory.hasGraphNodes(diagram)); }
@Test public void testGetHasGraphNodesWhenIsReturnsTrue() { when(graphUtils.getDRGElements(diagram)).thenReturn(singletonList(mock(DRGElement.class))); assertTrue(documentationFactory.hasGraphNodes(diagram)); }