### Question:
ProviderPresenter { public void onProviderSelected(@Observes final ProviderSelectedEvent event) { if (event.getProviderKey() != null) { load(event.getProviderKey()); } } @Inject  ProviderPresenter(final View view,
                             final Caller<ProviderService> providerService,
                             final Caller<ProvisioningScreensService> provisioningScreensService,
                             final ProviderStatusEmptyPresenter providerStatusEmptyPresenter,
                             final ProviderStatusPresenter providerStatusPresenter,
                             final ProviderConfigEmptyPresenter providerConfigEmptyPresenter,
                             final ClientProviderHandlerRegistry providerHandlerRegistry,
                             final Event<NotificationEvent> notification,
                             final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent,
                             final Event<AddNewRuntimeEvent> addNewRuntimeEvent); @PostConstruct void init(); void onProviderSelected(@Observes final ProviderSelectedEvent event); void onRefreshRuntime(@Observes final RefreshRuntimeEvent event); void refresh(); void onRemoveProvider(); void removeProvider(); void deploy(); IsElement getView();  }### Answer:
@Test public void testOnProviderSelectedWithRuntimes() { prepareRuntimesInfo(); when(runtimeItems.isEmpty()).thenReturn(false); presenter.onProviderSelected(new ProviderSelectedEvent(providerKey)); verifyUILoadedWithItems(1); verifyRuntimesInfoLoaded(1); }
@Test public void testOnProviderSelectedWithNoRuntimes() { prepareRuntimesInfo(); when(runtimeItems.isEmpty()).thenReturn(true); presenter.onProviderSelected(new ProviderSelectedEvent(providerKey)); verifyUILoadedWithNoItems(1); verifyRuntimesInfoLoaded(1); }