public static boolean fileExists(String host, String privateKey, String path){
		Assert.hasText(host, "host must not be null nor empty");
		Assert.hasText(privateKey, "privateKey must not be null nor empty");
		Assert.hasText(path, "path must not be null nor empty");
		boolean result = true;
		final SshjSshClient client = getSSHClient(host, privateKey);
		ExecResponse response = client.exec("ls -al " + path);
		if (response.getExitStatus() > 0){
			result = false;
		}
		return result;
	}
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