### Question:
ProvisioningManagementPerspective { protected void onAddNewProviderType(@Observes final AddNewProviderTypeEvent event) { providerTypeService.call((Map<ProviderType, ProviderTypeStatus> result) -> { enableProviderTypeWizard.start(buildProviderStatusList(result)); }).getProviderTypesStatus(); } @Inject  ProvisioningManagementPerspective(final Caller<ProviderTypeService> providerTypeService,
                                             final Caller<RuntimeService> runtimeService,
                                             final EnableProviderTypeWizard enableProviderTypeWizard,
                                             final NewProviderWizard newProviderWizard,
                                             final NewDeployWizard newDeployWizard,
                                             final ClientProviderHandlerRegistry handlerRegistry); @Perspective PerspectiveDefinition buildPerspective(); static final String IDENTIFIER; }### Answer:
@Test public void testAddNewProviderType() { List<ProviderType> providerTypes = mockProviderTypeList(PROVIDER_TYPE_COUNT); Map<ProviderType, ProviderTypeStatus> providerTypeStatusMap = new HashMap<>(); providerTypes.forEach(providerType -> providerTypeStatusMap.put(providerType, mock(ProviderTypeStatus.class))); when(providerTypeService.getProviderTypesStatus()).thenReturn(providerTypeStatusMap); List<ProviderType> properlyInstalledProviderTypes = new ArrayList<>(); properlyInstalledProviderTypes.add(providerTypes.get(0)); properlyInstalledProviderTypes.add(providerTypes.get(3)); properlyInstalledProviderTypes.add(providerTypes.get(5)); properlyInstalledProviderTypes.forEach(providerType -> when(handlerRegistry.isProviderInstalled(providerType.getKey())).thenReturn(true)); perspective.onAddNewProviderType(mock(AddNewProviderTypeEvent.class)); verify(providerTypeService, times(1)).getProviderTypesStatus(); verify(enableProviderTypeWizard, times(1)).start(providerTypesCaptor.capture()); assertEquals(properlyInstalledProviderTypes.size(), providerTypesCaptor.getValue().size()); @SuppressWarnings("unchecked") List<Pair<ProviderType, ProviderTypeStatus>> capturedValues = providerTypesCaptor.getValue(); capturedValues.forEach(value -> assertTrue(properlyInstalledProviderTypes.contains(value.getK1()))); }