private Map<String, String> getAvailableContainers(URL adminServer) {
		Map<String, String> result = null;
		result = StreamUtils.getAvailableContainers(adminServer);
		//if ec2 replace local aws DNS with external DNS
		if (isOnEc2) {
			Map<String, String> metadataIpMap = getPrivateIpToPublicIP(StreamUtils.getEC2RunningInstances(
					awsAccessKey, awsSecretKey, awsRegion));
			Iterator<String> keysIter = result.keySet().iterator();
			while (keysIter.hasNext()) {
				String key = keysIter.next();
				String privateIP = result.get(key);
				Iterator<String> metadataIter = metadataIpMap.keySet().iterator();
				while (metadataIter.hasNext()) {
					String metadataPrivateIP = metadataIter.next();
					//AWS metadata suffixes its data with .ec2.internal or .compute-1.internal.  So we are finding
					//the metadata private ip that contains the internal id returned by the admin server.
					if (metadataPrivateIP != null && metadataPrivateIP.contains(privateIP)) {
						result.put(key, metadataIpMap.get(metadataPrivateIP));
						break;
					}
				}
			}
		}
		return result;
	}
Retrieves the containers that are recognized by the adminServer.
If the test is on EC2 the IPs of the containers will be set to the external IPs versus the default internal IPs.

@param adminServer The adminserver to interrogate.
@return A Map of container servers , that is keyed on the containerID assigned by the admin server.
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/AbstractIntegrationTest.java