@Test
public void testOnErrorEvent() {

    ErrorEvent event = mock(ErrorEvent.class);
    when(event.getClientRuntimeError()).thenReturn(null);
    when(event.getMessage()).thenReturn("errorMessage");
    presenter.currentWorkflow = dataSetBasicAttributesWorkflow;
    presenter.onErrorEvent(event);
    verify(dataSetBasicAttributesWorkflow, times(0)).clear();
    verify(dataSetBasicAttributesWorkflow, times(0)).clearButtons();
    verify(dataSetBasicAttributesWorkflow, times(0)).showTestButton();
    verify(dataSetBasicAttributesWorkflow, times(0)).showNextButton();
    verify(dataSetBasicAttributesWorkflow, times(0)).showBackButton();
    verify(dataSetBasicAttributesWorkflow, times(0)).edit(any(DataSetDef.class));
    verify(errorPopupPresenter, times(1)).showMessage(anyString());
    verify(view, times(0)).setWidget(any(IsWidget.class));
}