@Test
	public void testHdfsSink() {
		String data = UUID.randomUUID().toString();
		stream("trigger --payload='" + data + "'" + XD_DELIMITER + sinks.hdfs());
		// wait up to 10 seconds for directory to be created
		assertTrue(HdfsSink.DEFAULT_DIRECTORY + " directory is missing from hdfs",
				hadoopUtil.waitForPath(10000, HdfsSink.DEFAULT_DIRECTORY));

		// This forces the hdfs to flush the contents to the file and close. So the tests can be executed.
		undeployStream();

		String path = HdfsSink.DEFAULT_DIRECTORY + "/" + HdfsSink.DEFAULT_FILE_NAME + "*";

		path = getTestFilePath(HdfsSink.DEFAULT_DIRECTORY, hadoopUtil.getFileStatus(path));
		assertValidHdfs(data, path);
	}
Asserts that data sent to the hdfs sink is stored on a hadoop hdfs.
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/HdfsTest.java