### Question:
ProviderTypePresenter { public void onProviderSelect(@Observes final ProviderSelectedEvent event) { if (event.getProviderKey() != null && event.getProviderKey().getId() != null && event.getProviderKey().getProviderTypeKey() != null && event.getProviderKey().getProviderTypeKey().equals(providerType.getKey())) { view.select(event.getProviderKey().getId()); } } @Inject  ProviderTypePresenter(final View view,
                                 final Caller<ProviderTypeService> providerTypeService,
                                 final Event<AddNewProviderEvent> addNewProviderEvent,
                                 final Event<ProviderTypeListRefreshEvent> providerTypeListRefreshEvent,
                                 final Event<ProviderSelectedEvent> providerSelectedEvent); @PostConstruct void init(); View getView(); void setup(final ProviderType providerType,
                      final Collection<ProviderKey> providers,
                      final ProviderKey firstProviderKey); void onProviderSelect(@Observes final ProviderSelectedEvent event); void onAddNewProvider(); void onRemoveProviderType();  }### Answer:
@Test public void onProviderSelectTest() { presenter.setup(providerType, providers, provider); providers.forEach(providerKey -> { presenter.onProviderSelect(new ProviderSelectedEvent(providerKey)); verify(view, times(1)).select(providerKey.getId()); }); }