@Test(expected = IllegalArgumentException.class) public void testGetVmTypesShouldThrowExceptionWhenAFlavourIsMissing() { Map<String, List<AzureInstanceView>> instanceGroups = createInstanceGroupsWithAMissingFlavour(); AzureStackView azureStackView = createAzureStackView(instanceGroups); underTest.getVmTypes(azureStackView); }
public Set<String> getVmTypes(AzureStackView azureStackView) { return azureStackView.getGroups().values().stream() .flatMap(Collection::stream) .map(this::getFlavour) .collect(Collectors.toSet()); }
AzureVirtualMachineTypeProvider { public Set<String> getVmTypes(AzureStackView azureStackView) { return azureStackView.getGroups().values().stream() .flatMap(Collection::stream) .map(this::getFlavour) .collect(Collectors.toSet()); } }
AzureVirtualMachineTypeProvider { public Set<String> getVmTypes(AzureStackView azureStackView) { return azureStackView.getGroups().values().stream() .flatMap(Collection::stream) .map(this::getFlavour) .collect(Collectors.toSet()); }  }
AzureVirtualMachineTypeProvider { public Set<String> getVmTypes(AzureStackView azureStackView) { return azureStackView.getGroups().values().stream() .flatMap(Collection::stream) .map(this::getFlavour) .collect(Collectors.toSet()); }  Set<String> getVmTypes(AzureStackView azureStackView); }
AzureVirtualMachineTypeProvider { public Set<String> getVmTypes(AzureStackView azureStackView) { return azureStackView.getGroups().values().stream() .flatMap(Collection::stream) .map(this::getFlavour) .collect(Collectors.toSet()); }  Set<String> getVmTypes(AzureStackView azureStackView);  }