private boolean isJobComplete(String jobName, int jobCompleteCount) {
		List<JobExecutionInfoResource> resources = getJobExecInfoByName(jobName);
		Iterator<JobExecutionInfoResource> resourceIter = resources.iterator();
		int count = 0;
		while (resourceIter.hasNext()) {
			JobExecutionInfoResource resource = resourceIter.next();

			if (jobName.equals(resource.getName())) {
				if (BatchStatus.COMPLETED.equals(resource.getJobExecution().getStatus())) {
					count++;
					break;
				} else {
					break;
				}
			}
		}
		return jobCompleteCount == count;
	}
Checks to see if the execution for the job is complete.
Returns true when the number of job complete executions matches the job completeCount.

@param jobName          The name of the job to be evaluated.
@param jobCompleteCount The number of executions that reached complete to return true.
@return true if the job is deployed else false
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/AbstractJobTest.java