### Question:
AbstractProjectDiagramEditor extends KieEditor<ProjectDiagramResource> implements DiagramEditorCore<ProjectMetadata, ProjectDiagram> { @Override public void onSaveError(final ClientRuntimeError error) { editor.onSaveError(error); } 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 testStunnerSave_SaveFailed() { final String errorMessage = "Something went wrong"; final ClientRuntimeError cre = new ClientRuntimeError(errorMessage); final Overview overview = assertBasicStunnerSaveOperation(true); final ServiceCallback<ProjectDiagram> serviceCallback = assertSaveOperation(overview); serviceCallback.onError(cre); verify(presenterCore).onSaveError(eq(cre)); final ArgumentCaptor<Consumer> consumerCaptor = ArgumentCaptor.forClass(Consumer.class); verify(diagramClientErrorHandler).handleError(eq(cre), consumerCaptor.capture()); final Consumer consumer = consumerCaptor.getValue(); consumer.accept(errorMessage); verify(errorPopupPresenter).showMessage(eq(errorMessage)); }
@Test @SuppressWarnings("unchecked") public void testXMLSave_SaveFailed() { final String xml = "xml"; final String errorMessage = "Something went wrong"; final ClientRuntimeError cre = new ClientRuntimeError(errorMessage); final ServiceCallback<String> serviceCallback = assertBasicXMLSaveOperation(xml); serviceCallback.onError(cre); verify(presenterCore).onSaveError(eq(cre)); final ArgumentCaptor<Consumer> consumerCaptor = ArgumentCaptor.forClass(Consumer.class); verify(diagramClientErrorHandler).handleError(eq(cre), consumerCaptor.capture()); final Consumer consumer = consumerCaptor.getValue(); consumer.accept(errorMessage); verify(errorPopupPresenter).showMessage(eq(errorMessage)); }