@Test
	public void testGetJobInstanceByJobName() throws Exception {
		mockMvc.perform(
				get("/jobs/instances").param("jobname", "job1").param("startJobInstance", "0").param("pageSize", "20").accept(
						MediaType.APPLICATION_JSON)).andExpect(status().isOk())
				.andExpect(jsonPath("$", Matchers.hasSize(2)))
				.andExpect(jsonPath("$[*].instanceId", contains(0, 3)))
				.andExpect(jsonPath("$[*].jobName", contains("job1", "job1")));
	}
Tests REST compliance of {@link BatchJobInstancesController} endpoints.

@author Ilayaperumal Gopinathan
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/BatchJobInstancesControllerIntegrationTests.java