public boolean checkJob(String jobName, String jobDefinition, boolean deployed) {
		Assert.hasText(jobName, "jobName must not be empty nor null");
		Assert.hasText(jobDefinition, "jobDefinition must not be empty nor null");
		JobDefinitionResource resource = getJobDefinitionResource(jobName);
		long timeout = System.currentTimeMillis() + WAIT_TIME;
		String deployedStatus = (deployed) ? "deployed" : "undeployed";
		boolean status = resource != null && deployedStatus.equals(resource.getStatus())
				&& jobDefinition.equals(resource.getDefinition());
		while (!status && System.currentTimeMillis() < timeout) {
			sleepOneSecond();
			resource = getJobDefinitionResource(jobName);
			status = resource != null && deployedStatus.equals(resource.getStatus())
					&& jobDefinition.equals(resource.getDefinition());
		}
		return status;
	}
Verifies that the description and status for the job name is as expected.

@param jobName       The name of the job to evaluate.
@param jobDefinition the definition that the job should have.
@param deployed      if true the job should be deployed.  if false the job should not be deployed.
@return true if the job is as expected.   false if the job is not.
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/AbstractJobTest.java