private boolean jobExists(String jobName) {
		PagedResources<JobDefinitionResource> list = distributedTestSupport.ensureTemplate()
				.jobOperations().list();

		for (JobDefinitionResource job : list) {
			if (job.getName().equals(jobName)) {
				return true;
			}
		}
		return false;
	}
Check if the job exists.

@param jobName job name
@return boolean true if the stream exists.
spring-xd-distributed-test/src/test/java/org/springframework/xd/distributed/test/AbstractDistributedTests.java