@Test public void testCollectOnePublicSubnetPerAzWhenPrivateOnlyThenReturnsEmptyMap() { List<CloudSubnet> cloudSubnets = new SubnetBuilder() .withPrivateSubnet(AZ_A) .withPrivateSubnet(AZ_B) .build(); List<CloudSubnet> publicSubnetsPerAz = subnetSelectorService.collectPublicSubnets(cloudSubnets); assertTrue(publicSubnetsPerAz.isEmpty()); }
List<CloudSubnet> collectPublicSubnets(Collection<CloudSubnet> subnetMetas) { List<CloudSubnet> result = new ArrayList<>(); for (CloudSubnet subnetMeta : subnetMetas) { if (isUsablePublicSubnet(subnetMeta)) { result.add(subnetMeta); } } LOGGER.debug("Public subnets for selections: {}", result); return result; }
SubnetSelectorService { List<CloudSubnet> collectPublicSubnets(Collection<CloudSubnet> subnetMetas) { List<CloudSubnet> result = new ArrayList<>(); for (CloudSubnet subnetMeta : subnetMetas) { if (isUsablePublicSubnet(subnetMeta)) { result.add(subnetMeta); } } LOGGER.debug("Public subnets for selections: {}", result); return result; } }
SubnetSelectorService { List<CloudSubnet> collectPublicSubnets(Collection<CloudSubnet> subnetMetas) { List<CloudSubnet> result = new ArrayList<>(); for (CloudSubnet subnetMeta : subnetMetas) { if (isUsablePublicSubnet(subnetMeta)) { result.add(subnetMeta); } } LOGGER.debug("Public subnets for selections: {}", result); return result; }  }
SubnetSelectorService { List<CloudSubnet> collectPublicSubnets(Collection<CloudSubnet> subnetMetas) { List<CloudSubnet> result = new ArrayList<>(); for (CloudSubnet subnetMeta : subnetMetas) { if (isUsablePublicSubnet(subnetMeta)) { result.add(subnetMeta); } } LOGGER.debug("Public subnets for selections: {}", result); return result; }   }
SubnetSelectorService { List<CloudSubnet> collectPublicSubnets(Collection<CloudSubnet> subnetMetas) { List<CloudSubnet> result = new ArrayList<>(); for (CloudSubnet subnetMeta : subnetMetas) { if (isUsablePublicSubnet(subnetMeta)) { result.add(subnetMeta); } } LOGGER.debug("Public subnets for selections: {}", result); return result; }    }