private static Integer[] extractPidsFromJPS(String jpsResult) {
		String[] pidList = StringUtils.tokenizeToStringArray(jpsResult, "\n");
		ArrayList<Integer> pids = new ArrayList<Integer>();
		for (String pidData : pidList) {
			if (pidData.contains("ContainerServerApplication")) {
				pids.add(Integer.valueOf(StringUtils.tokenizeToStringArray(pidData, " ")[0]));
			}
		}
		return pids.toArray(new Integer[pids.size()]);
	}
Verifies the specified path exists on remote machine.
@param host The host where the file exists.
@param privateKey ssh private key credential
@param path path to file or directory
@return true if file exists else false.
spring-xd-integration-test/src/main/java/org/springframework/xd/integration/util/StreamUtils.java