private String getDataFromResultFile(URL url, String fileName) {
		String resultFileName = fileName;
		File file = new File(resultFileName);
		try {

			if (isOnEc2) {
				resultFileName = StreamUtils.transferResultsToLocal(xdEnvironment.getPrivateKey(), url, fileName);
				file = new File(resultFileName);
			}

			return FileCopyUtils.copyToString(new InputStreamReader(new FileInputStream(resultFileName)));
		}
		catch (IOException ioException) {
			throw new IllegalStateException(ioException.getMessage(), ioException);
		}
		finally {
			if (file.exists()) {
				file.delete();
			}
		}

	}
Takes the content of the file and places it in a string. If the file is on EC2 it will copy the file from ec2 to
the local machine.

@param url The URL of the EC2 instance where the file is located. (if tests on ec2)
@param fileName The name of the file that contains the data
@return The content of the file as a string.
spring-xd-integration-test/src/main/java/org/springframework/xd/integration/util/XdEc2Validation.java