### Question:
DMNDiagramsSessionState { List<Import> getModelImports() { final Diagram drgDiagram = getDRGDiagram(); return dmnDiagramUtils.getDefinitions(drgDiagram).getImport(); } @Inject  DMNDiagramsSessionState(final DMNDiagramUtils dmnDiagramUtils); Diagram getDRGDiagram();  }### Answer:
@Test public void testGetModelImports() { final Definitions definitions = mock(Definitions.class); final Import import1 = mock(Import.class); final Import import2 = mock(Import.class); final Import import3 = mock(Import.class); final Import import4 = mock(Import.class); final Import import5 = mock(Import.class); final Import import6 = mock(Import.class); when(definitions.getImport()).thenReturn(asList(import1, import2, import3, import4, import5, import6)); when(dmnDiagramUtils.getDefinitions(stunnerDiagram1)).thenReturn(definitions); final List<Import> imports = sessionState.getModelImports(); assertTrue(imports.contains(import1)); assertTrue(imports.contains(import2)); assertTrue(imports.contains(import3)); assertTrue(imports.contains(import4)); assertTrue(imports.contains(import5)); assertTrue(imports.contains(import6)); }