public static boolean createRemoteDirectory(String path, String host, String privateKey, int waitTime) {
		boolean isDirectoryCreated = false;
		Assert.hasText(path, "path must not be empty nor null");
		Assert.hasText(host, "host must not be empty nor null");
		Assert.hasText(privateKey, "privateKey must not be empty nor null");
		long timeout = System.currentTimeMillis() + waitTime;
		while (!isDirectoryCreated && System.currentTimeMillis() < timeout) {
			SshjSshClient client = getSSHClient(host, privateKey);
			client.exec("mkdir " + path);
			ExecResponse response = client.exec("ls -al " + path);
			if (response.getExitStatus() > 0) {
				continue; //directory was not created
			}
			isDirectoryCreated = true;
		}
		return isDirectoryCreated;
	}
Creates a directory on a remote machine.  It a failure occurs it will retry until waitTime is exhausted.
@param path the directory that will be created
@param host the IP where the directory will be created
@param privateKey Private key to be used for signing onto remote machine.
@param waitTime The max time to try creating the directory
@return true if the directory was successfully created else false.
spring-xd-integration-test/src/main/java/org/springframework/xd/integration/util/StreamUtils.java