protected void waitForEmptyJobList(int waitTime) {
		PagedResources<JobDefinitionResource> resources = springXDTemplate.jobOperations().list();
		int jobSize = resources.getContent().size();
		long timeout = System.currentTimeMillis() + waitTime;
		while (jobSize > 0 && System.currentTimeMillis() < timeout) {
			sleepOneSecond();
			jobSize = resources.getContent().size();
		}
	}
Wait up to the specified time for the job list to become empty.

@param waitTime The time in Millis to wait.
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/AbstractJobTest.java