@Test public void testGetVmTypesShouldReturnsTheAvailableVmTypes() { Map<String, List<AzureInstanceView>> instanceGroups = createInstanceGroups(); AzureStackView azureStackView = createAzureStackView(instanceGroups); Set<String> actual = underTest.getVmTypes(azureStackView); Assert.assertEquals(4, actual.size()); Assert.assertTrue(actual.contains(STANDARD_DS_V2)); Assert.assertTrue(actual.contains(STANDARD_D3_V2)); Assert.assertTrue(actual.contains(STANDARD_E16A_V3)); Assert.assertTrue(actual.contains(STANDARD_D15_V2)); }
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);  }