private JobDefinitionResource getJobDefinitionResource(String jobName) {
		PagedResources<JobDefinitionResource> resources = springXDTemplate.jobOperations().list();
		long timeout = System.currentTimeMillis() + WAIT_TIME;
		while (!resources.iterator().hasNext() && System.currentTimeMillis() < timeout) {
			sleepOneSecond();
			resources = springXDTemplate.jobOperations().list();
		}

		JobDefinitionResource result = null;
		Iterator<JobDefinitionResource> resourceIter = resources.iterator();
		while (resourceIter.hasNext()) {
			JobDefinitionResource resource = resourceIter.next();
			if (jobName.equals(resource.getName())) {
				result = resource;
				break;
			}
		}
		return result;
	}
Create an new instance of the SpringXDTemplate given the Admin Server URL

@return A new instance of SpringXDTemplate
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/AbstractJobTest.java