public static Map<Long, String> getRunningContainers(SpringXDTemplate template) {
		Map<Long, String> mapPidUuid = new HashMap<Long, String>();
		PagedResources<DetailedContainerResource> containers =
				template.runtimeOperations().listContainers();
		for (DetailedContainerResource container : containers) {
			logger.trace("Container: {}", container);
			long pid = Long.parseLong(container.getAttribute("pid"));
			mapPidUuid.put(pid, container.getAttribute("id"));
		}

		return mapPidUuid;
	}
Return a map of running containers. Map key is pid; value is
the container ID.

@param template REST template used to communicate with the admin server
@return map of process id to container id
spring-xd-distributed-test/src/main/java/org/springframework/xd/distributed/util/ServerProcessUtils.java