### Question:
DMNDiagramHelper { public List<DRGElement> getNodes(final Diagram diagram) { return dmnDiagramUtils.getDRGElements(diagram); } @Inject  DMNDiagramHelper(final DiagramService diagramService,
                            final DMNDiagramUtils dmnDiagramUtils); List<DRGElement> getNodes(final Diagram diagram); List<ItemDefinition> getItemDefinitions(final Diagram diagram); String getNamespace(final Path path); String getNamespace(final Diagram diagram); Diagram<Graph, Metadata> getDiagramByPath(final Path path);  }### Answer:
@Test public void testGetNodes() { final DRGElement drgElement = mock(DRGElement.class); final List<DRGElement> expectedNodes = singletonList(drgElement); when(dmnDiagramUtils.getDRGElements(diagram)).thenReturn(expectedNodes); final List<DRGElement> actualNodes = helper.getNodes(diagram); assertEquals(expectedNodes, actualNodes); }