DataSetDefEditorPresenter extends BaseEditor { void onErrorEvent(@Observes ErrorEvent errorEvent) { checkNotNull("errorEvent", errorEvent); if (errorEvent.getClientRuntimeError() != null) { showError(errorEvent.getClientRuntimeError()); } else if (errorEvent.getMessage() != null) { showError(errorEvent.getMessage()); } }  @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartTitle String getTitleText(); @WorkbenchMenu Menus getMenus(); @WorkbenchPartView Widget getWidget(); @OnMayClose boolean onMayClose(); @OnClose void onClose(); DataSetDef getDataSetDef(); int getCurrentModelHash(); void disposeWorkflow(); @Inject
    public DataSetDefScreenView view; }
@Test public void testOnErrorEvent() { ErrorEvent event = mock(ErrorEvent.class); when(event.getClientRuntimeError()).thenReturn(null); when(event.getMessage()).thenReturn("errorMessage"); presenter.onErrorEvent(event); verify(editWorkflow, times(0)).clear(); verify(editWorkflow, times(0)).clearButtons(); verify(editWorkflow, times(0)).showTestButton(); verify(editWorkflow, times(0)).showNextButton(); verify(editWorkflow, times(0)).showBackButton(); verify(editWorkflow, times(0)).edit(any(DataSetDef.class), any(List.class)); verify(errorPopupPresenter, times(1)).showMessage(anyString()); verify(view, times(0)).setWidget(any(IsWidget.class)); }