@Test
	public void testIncrementalJdbcHdfsJobWithColumnsAndTablePartitionDifferentFromCheck() {
		// Deploy stream and job.
		jdbcSink.getJdbcTemplate().getDataSource();
		IncrementalJdbcHdfsJob job = new IncrementalJdbcHdfsJob(IncrementalJdbcHdfsJob.DEFAULT_DIRECTORY, IncrementalJdbcHdfsJob.DEFAULT_FILE_NAME, IncrementalJdbcHdfsJob.DEFAULT_TABLE, "payload,checkColumn", "payload", 3, "checkColumn", -1);
		// Use a trigger to send data to JDBC
		jdbcSink.columns("payload,checkColumn");
		stream("dataSender", sources.http() + XD_DELIMITER
				+ jdbcSink);

		sources.httpSource("dataSender").postData("{\"payload\": 1, \"checkColumn\": 1}");
		sources.httpSource("dataSender").postData("{\"payload\": 2, \"checkColumn\": 1}");
		sources.httpSource("dataSender").postData("{\"payload\": 3, \"checkColumn\": 1}");

		job(jobName, job.toDSL(), true);
		jobLaunch(jobName);
		waitForJobToComplete(jobName);

		// Evaluate the results of the test.
		String dir = JdbcHdfsJob.DEFAULT_DIRECTORY + "/";
		String path0 = JdbcHdfsJob.DEFAULT_DIRECTORY + "/" + JdbcHdfsJob.DEFAULT_FILE_NAME + "-p0" + "-0.csv";
		String path1 = JdbcHdfsJob.DEFAULT_DIRECTORY + "/" + JdbcHdfsJob.DEFAULT_FILE_NAME + "-p1" + "-0.csv";
		String path2 = JdbcHdfsJob.DEFAULT_DIRECTORY + "/" + JdbcHdfsJob.DEFAULT_FILE_NAME + "-p2" + "-0.csv";
		assertPathsExists(path0, path1, path2);
		Collection<FileStatus> fileStatuses = hadoopUtil.listDir(dir);
		assertEquals("The number of files in list result should only be 4. The directory itself and 3 files. ", 4,
				fileStatuses.size());
		for (FileStatus fileStatus : fileStatuses) {
			if (!fileStatus.isDirectory()) {
				assertTrue("The file should be of reasonable size", fileStatus.getLen() > 2 && fileStatus.getLen() < 10);
			}
		}

		sources.httpSource("dataSender").postData("{\"payload\": 4, \"checkColumn\": 2}");
		sources.httpSource("dataSender").postData("{\"payload\": 5, \"checkColumn\": 2}");
		sources.httpSource("dataSender").postData("{\"payload\": 6, \"checkColumn\": 2}");

		jobLaunch(jobName);
		waitForJobToComplete(jobName, 2);

		// Evaluate the results of the test.
		String path3 = JdbcHdfsJob.DEFAULT_DIRECTORY + "/" + JdbcHdfsJob.DEFAULT_FILE_NAME + "-p0" + "-1.csv";
		String path4 = JdbcHdfsJob.DEFAULT_DIRECTORY + "/" + JdbcHdfsJob.DEFAULT_FILE_NAME + "-p1" + "-1.csv";
		String path5 = JdbcHdfsJob.DEFAULT_DIRECTORY + "/" + JdbcHdfsJob.DEFAULT_FILE_NAME + "-p2" + "-1.csv";
		assertPathsExists(path3, path4, path5);
		fileStatuses = hadoopUtil.listDir(dir);
		assertEquals("The number of files in list result should only be 7. The directory itself and 5 files. ", 7,
				fileStatuses.size());
		for (FileStatus fileStatus : fileStatuses) {
			if (!fileStatus.isDirectory()) {
				assertTrue("The file should be of reasonable size", fileStatus.getLen() > 2 && fileStatus.getLen() < 10);
			}
		}
	}
Asserts that jdbcHdfsJob has written the test data from a jdbc source table to a hdfs file system.
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/JdbcHdfsTest.java