public static Map<String, String> getAvailableContainers(URL adminServer) {
		Assert.notNull(adminServer, "adminServer must not be null");
		HashMap<String, String> results = new HashMap<String, String>();
		Iterator<DetailedContainerResource> iter = createSpringXDTemplate(adminServer).runtimeOperations().listContainers().iterator();
		while (iter.hasNext()) {
			DetailedContainerResource container = iter.next();
			results.put(container.getAttribute("id"), container.getAttribute("host"));
		}
		return results;
	}
Creates a map of container Id's and the associated host.
@param adminServer The admin server to be queried.
@return Map where the key is the container id and the value is the host ip.
spring-xd-integration-test/src/main/java/org/springframework/xd/integration/util/StreamUtils.java