DataSetDefWizardScreen { void onProviderTypeSelected(final DataSetProviderTypeWorkflow providerTypeWorkflow) { final DataSetProviderType selectedProviderType = providerTypeWorkflow.getProviderType(); try { clientServices.newDataSet(selectedProviderType, this::basicAttributesEdition); } catch (final Exception e) { showError(e.getCause() != null ? e.getCause().getMessage() : e.getMessage()); } } @Inject  DataSetDefWizardScreen(final SyncBeanManager beanManager,
                                  final DataSetEditorWorkflowFactory workflowFactory,
                                  final Caller<DataSetDefVfsServices> services,
                                  final DataSetClientServices clientServices,
                                  final Event<NotificationEvent> notification,
                                  final PlaceManager placeManager,
                                  final ErrorPopupPresenter errorPopupPresenter,
                                  final SavePopUpPresenter savePopUpPresenter,
                                  final DataSetDefScreenView view); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsWidget getView(); @OnStartup void init(PlaceRequest placeRequest); @OnClose void onClose(); void completeEdition(final DataSetDef dataSetDef,
                                final DataSet dataset); public DataSetDefScreenView view; }
@Test public void testOnProviderTypeSelected() throws Exception { when(dataSetProviderTypeWorkflow.getProviderType()).thenReturn(DataSetProviderType.SQL); presenter.onProviderTypeSelected(dataSetProviderTypeWorkflow); assertEquals(dataSetBasicAttributesWorkflow, presenter.currentWorkflow); verify(view, times(1)).setWidget(any(IsWidget.class)); verify(dataSetBasicAttributesWorkflow, times(1)).edit(any(DataSetDef.class)); verify(editWorkflow, times(1)).showTestButton(); verify(editWorkflow, times(1)).showBackButton(); verify(editWorkflow, times(0)).showNextButton(); }