@Test
public void testLoadDocumentGraphEmptyModel() throws Exception {

    final ObservablePath documentPath = mock(ObservablePath.class);
    final Overview overview = mock(Overview.class);
    final GuidedDecisionTableEditorGraphModel graphModel = mock(GuidedDecisionTableEditorGraphModel.class);
    final GuidedDecisionTableEditorGraphContent graphContent = mock(GuidedDecisionTableEditorGraphContent.class);
    when(documentPath.getFileName()).thenReturn("GDT");
    when(versionRecordManager.getCurrentPath()).thenReturn(documentPath);
    when(dtGraphService.loadContent(documentPath)).thenReturn(graphContent);
    when(versionRecordManager.getPathToLatest()).thenReturn(documentPath);
    when(graphContent.getOverview()).thenReturn(overview);
    when(graphContent.getModel()).thenReturn(graphModel);
    presenter.loadDocumentGraph(documentPath);
    verify(view).showLoading();
    verify(view).hideBusyIndicator();
    verify(view).refreshTitle(startsWith("GDT"));
    // initialise when no documents
    verify(editMenuItem).setEnabled(false);
    verify(viewMenuItem).setEnabled(false);
    verify(insertMenuItem).setEnabled(false);
    verify(radarMenuItem).setEnabled(false);
    verify(kieEditorWrapperView).clear();
    verify(kieEditorWrapperView).addMainEditorPage(view);
    verify(kieEditorWrapperView).addOverviewPage(eq(overviewWidget), any(com.google.gwt.user.client.Command.class));
    verify(overviewWidget).setContent(overview, documentPath);
}