DataSetProviderTypeWorkflow extends DataSetEditorWorkflow<DataSetDef> { void onProviderTypeSelected(@Observes DataSetDefCreationRequestEvent event) { PortablePreconditions.checkNotNull("CreateDataSetDefRequestEvent", event); if (event.getContext().equals(providerTypeEditor)) { super.saveButtonCommand.execute(); } } @Inject  DataSetProviderTypeWorkflow(final DataSetClientServices clientServices,
                                       final DataSetValidatorProvider validatorProvider,
                                       final SyncBeanManager beanManager,
                                       final DataSetDefProviderTypeEditor providerTypeEditor,
                                       final Event<SaveRequestEvent> saveRequestEvent,
                                       final Event<CancelRequestEvent> cancelRequestEvent,
                                       final Event<TestDataSetRequestEvent> testDataSetEvent,
                                       final View view); @PostConstruct void init(); DataSetProviderTypeWorkflow edit(final DataSetDef def); DataSetProviderType getProviderType(); DataSetProviderTypeWorkflow providerTypeEdition();  }
@Test public void testProviderTypeSelected() { DataSetDefCreationRequestEvent createEvent = new DataSetDefCreationRequestEvent(providerTypeEditor, DataSetProviderType.BEAN); presenter.onProviderTypeSelected(createEvent); verify(saveRequestEvent).fire(any()); }