### Question:
ProvisioningManagementBrowserPresenter { protected void onRefreshProviderTypes(@Observes final ProviderTypeListRefreshEvent event) { refreshProviderTypes(event.getProviderTypeKey()); } @Inject  ProvisioningManagementBrowserPresenter(final ProvisioningManagementBrowserPresenter.View view,
                                                  final ProviderTypeNavigationPresenter providerTypeNavigationPresenter,
                                                  final ProviderTypePresenter providerTypePresenter,
                                                  final ProviderTypeEmptyPresenter providerTypeEmptyPresenter,
                                                  final ProviderEmptyPresenter providerEmptyPresenter,
                                                  final ProviderPresenter providerPresenter,
                                                  final Caller<ProviderTypeService> providerTypeService,
                                                  final Caller<ProvisioningScreensService> provisioningScreensService,
                                                  final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); @PostConstruct void init(); @OnOpen void onOpen(); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsElement getView(); static final String IDENTIFIER; }### Answer:
@Test public void testOnRefreshProviderTypesWithEnabledProviderTypes() { when(providerTypeService.getEnabledProviderTypes()).thenReturn(providerTypes); ProviderType selectedProviderType = providerTypes.iterator().next(); presenter.onRefreshProviderTypes(new ProviderTypeListRefreshEvent(selectedProviderType.getKey())); verify(providerTypeNavigationPresenter, times(1)).setup(selectedProviderType, providerTypes); verify(providerTypeSelectedEvent, times(1)).fire(new ProviderTypeSelectedEvent(selectedProviderType.getKey())); }
@Test public void testOnRefreshProviderTypesWithNOEnabledProviderTypes() { providerTypes.clear(); when(providerTypeService.getEnabledProviderTypes()).thenReturn(providerTypes); presenter.onRefreshProviderTypes(new ProviderTypeListRefreshEvent()); verify(view, times(1)).setEmptyView(providerTypeEmptyPresenterView); verify(providerTypeNavigationPresenter, times(1)).clear(); verify(providerTypeNavigationPresenter, times(0)).setup(any(ProviderType.class), anyCollectionOf(ProviderType.class)); }