DataServiceDelegate extends DataServiceFactory { public void createNewDataService( String stepName ) { if ( stepName == null ) { StepMeta stepMeta = getLastStepOfActiveTrans(); if ( stepMeta != null ) { stepName = stepMeta.getName(); } } TransMeta transMeta = getSpoon().getActiveTransformation(); if ( transMeta.hasChanged() ) { showSavePrompt( BaseMessages.getString( PKG, "DataServiceDelegate.NewTransChanged.Title" ), BaseMessages.getString( PKG, "DataServiceDelegate.NewTransChanged.Message" ) ); if ( transMeta.hasChanged() ) { return; } } try { getUiFactory().getDataServiceDialogBuilder( transMeta ).serviceStep( stepName ).build( this ).open(); } catch ( KettleException e ) { getLogChannel().logError( "Unable to create a new data service", e ); } } DataServiceDelegate( DataServiceContext context );  DataServiceDelegate( DataServiceContext context, Spoon spoon );  DataServiceDelegate( DataServiceContext context, Supplier<Spoon> spoonSupplier ); static DataServiceDelegate withDefaultSpoonInstance( DataServiceContext context ); void createNewDataService( String stepName ); void editDataService( DataServiceMeta dataService ); void suggestEdit( DataServiceMeta dataServiceMeta, String title, String text ); SynchronizationListener createSyncService(); void showError( String title, String text ); boolean showPrompt( String title, String text ); @Override void save( DataServiceMeta dataService ); void removeDataService( DataServiceMeta dataService, boolean prompt ); @Override void removeDataService( DataServiceMeta dataService ); void showTestDataServiceDialog( DataServiceMeta dataService ); void showTestDataServiceDialog( DataServiceMeta dataService, Shell shell ); @Override Repository getRepository(); void showDriverDetailsDialog(); void showDriverDetailsDialog( Shell shell ); DataServiceRemapConfirmationDialog.Action showRemapConfirmationDialog( DataServiceMeta dataService,
      List<String> remainingStepNames ); DataServiceRemapStepChooserDialog.Action showRemapStepChooserDialog( DataServiceMeta dataService,
      List<String> remainingStepNames, TransMeta trans ); void showRemapNoStepsDialog( Shell shell ); Spoon getSpoon(); Shell getShell(); Display getDisplay(); void syncExec( Runnable runnable );  }
@Test public void testCreateNewDataService() throws Exception { delegate.createNewDataService( STEP_NAME ); verify( dialogBuilder ).serviceStep( STEP_NAME ); verify( dataServiceDialog ).open(); }