### Question:
NewProviderWizard extends AbstractMultiPageWizard { public void start(final ProviderType providerType) { this.providerType = providerType; this.providerConfigurationForm = getProviderConfigurationForm(providerType.getKey()); if (providerConfigurationForm != null) { providerConfigurationPage.setProviderConfigurationForm(providerConfigurationForm); clear(); super.start(); } else { popupHelper.showErrorPopup(translationService.format( NewProviderWizard_ProviderNotProperlyConfiguredInSystemErrorMessage, (providerType != null ? providerType.getName() : null))); } } @Inject  NewProviderWizard(final ProviderConfigurationPagePresenter providerConfigurationPage,
                             final ClientProviderHandlerRegistry handlerRegistry,
                             final PopupHelper popupHelper,
                             final TranslationService translationService,
                             final Caller<ProviderService> providerService,
                             final Event<NotificationEvent> notification,
                             final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); @PostConstruct void init(); void start(final ProviderType providerType); @Override String getTitle(); @Override int getPreferredHeight(); @Override int getPreferredWidth(); @Override void complete();  }### Answer:
@Test public void testStartProviderConfigured() { wizard.start(providerType); verify(handlerRegistry, times(2)).getProviderHandler(providerType.getKey()); verify(providerHandler, times(2)).getFormResolver(); verify(formResolver, times(1)).newProviderConfigurationForm(); verify(configurationPage, times(1)).setProviderConfigurationForm(configurationForm); }
@Test public void testStartProviderNotConfigured() { when(handlerRegistry.isProviderInstalled(providerType.getKey())).thenReturn(false); wizard.start(providerType); verify(handlerRegistry, never()).getProviderHandler(providerType.getKey()); verify(providerHandler, never()).getFormResolver(); verify(formResolver, never()).newProviderConfigurationForm(); verify(configurationPage, never()).setProviderConfigurationForm(configurationForm); wizard.start(); verify(popupHelper, times(1)).showErrorPopup(ERROR_MESSAGE); }