@Test
public void testOnCancelEvent() {

    presenter.currentWorkflow = dataSetBasicAttributesWorkflow;
    CancelRequestEvent event = mock(CancelRequestEvent.class);
    when(event.getContext()).thenReturn(dataSetBasicAttributesWorkflow);
    presenter.onCancelEvent(event);
    verify(workflowFactory, times(1)).providerType();
    verify(workflowFactory, times(0)).edit(any(DataSetProviderType.class));
    verify(workflowFactory, times(0)).basicAttributes(any(DataSetProviderType.class));
}