protected boolean waitForJobDeploymentChange(String jobName, int waitTime, boolean isDeployed) {
		boolean result = isJobDeployed(jobName);
		long timeout = System.currentTimeMillis() + waitTime;
		while (!result && System.currentTimeMillis() < timeout) {
			sleepOneSecond();
			result = isDeployed ? isJobDeployed(jobName) : isJobUndeployed(jobName);
		}

		return result;
	}
Waits up to the wait time for a job to be deployed or undeployed.

@param jobName    The name of the job to be evaluated.
@param waitTime   the amount of time in millis to wait.
@param isDeployed if true the method will wait for the job to be deployed.  If false it will wait for the job to become undeployed.
@return true if the job is deployed else false.
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/AbstractJobTest.java