### Question:
AbstractProjectDiagramEditor extends KieEditor<ProjectDiagramResource> implements DiagramEditorCore<ProjectMetadata, ProjectDiagram> { @Override public void open(final ProjectDiagram diagram, final Viewer.Callback callback) { editor.open(diagram, callback); SaveAndRenameCommandBuilder saveAndRenameCommandBuilder = getSaveAndRenameCommandBuilder(); saveAndRenameCommandBuilder.addContentSupplier(editor.getEditorProxy().getContentSupplier()); } AbstractProjectDiagramEditor(final AbstractProjectDiagramEditor.View view,
                                        final TextEditorView xmlEditorView,
                                        final ManagedInstance<SessionEditorPresenter<EditorSession>> editorSessionPresenterInstances,
                                        final ManagedInstance<SessionViewerPresenter<ViewerSession>> viewerSessionPresenterInstances,
                                        final Event<OnDiagramFocusEvent> onDiagramFocusEvent,
                                        final Event<OnDiagramLoseFocusEvent> onDiagramLostFocusEvent,
                                        final Event<NotificationEvent> notificationEvent,
                                        final ErrorPopupPresenter errorPopupPresenter,
                                        final DiagramClientErrorHandler diagramClientErrorHandler,
                                        final DocumentationView documentationView,
                                        final R resourceType,
                                        final AbstractDiagramEditorMenuSessionItems<?> menuSessionItems,
                                        final ProjectMessagesListener projectMessagesListener,
                                        final ClientTranslationService translationService,
                                        final ClientProjectDiagramService projectDiagramServices,
                                        final Caller<ProjectDiagramResourceService> projectDiagramResourceServiceCaller); @PostConstruct @SuppressWarnings("unchecked") void init(); @Override RemoteCallback<Path> getSaveSuccessCallback(final int newHash); @Override void hideDocks(); @Override void showDocks(); @Override //Override visibility from KieEditor to allow inner class ProjectDiagramEditorCore access abstract String getEditorIdentifier(); @Override String getTitleText(); @Override void open(final ProjectDiagram diagram,
                     final Viewer.Callback callback); @Override Annotation[] getDockQualifiers(); @Override void initialiseKieEditorForSession(final ProjectDiagram diagram); @SuppressWarnings("unchecked") void addDocumentationPage(final ProjectDiagram diagram); @Override SessionEditorPresenter<EditorSession> newSessionEditorPresenter(); @Override SessionViewerPresenter<ViewerSession> newSessionViewerPresenter(); @Override int getCurrentDiagramHash(); @Override CanvasHandler getCanvasHandler(); @Override void onSaveError(final ClientRuntimeError error); @Override SessionPresenter<? extends ClientSession, ?, Diagram> getSessionPresenter(); @Override void doFocus(); @Override void doLostFocus(); AbstractDiagramEditorMenuSessionItems getMenuSessionItems();  }### Answer:
@Test @SuppressWarnings("unchecked") public void testOpen() { Overview overview = open(); verify(view).showLoading(); verify(view).setWidget(eq(sessionPresenterView)); verify(sessionEditorPresenter).withToolbar(eq(false)); verify(sessionEditorPresenter).withPalette(eq(true)); verify(sessionEditorPresenter).open(eq(diagram), any(SessionPresenter.SessionPresenterCallback.class)); assertEquals(diagram.hashCode(), presenter.getCurrentDiagramHash()); verify(view).hideBusyIndicator(); verify(overviewWidget).setContent(eq(overview), eq(filePath)); verify(kieView).clear(); verify(kieView).addMainEditorPage(eq(view)); verify(kieView).addOverviewPage(eq(overviewWidget), any(com.google.gwt.user.client.Command.class)); verify(saveAndRenameCommandBuilderMock).addContentSupplier(any()); }