@Test
	public void testGetJobInstanceByInstanceId() throws Exception {
		mockMvc.perform(
				get("/jobs/instances/0").accept(MediaType.APPLICATION_JSON)).andExpect(status().isOk())
				.andExpect(jsonPath("$.instanceId").value(0))
				.andExpect(jsonPath("$.jobName").value("job1"))
				.andExpect(jsonPath("$.jobExecutions", Matchers.hasSize(1)))
				.andExpect(jsonPath("$.jobExecutions[0].jobExecution.id").value(3))
				.andExpect(jsonPath("$.jobExecutions[0].jobExecution.stepExecutions", Matchers.hasSize(1)))
				.andExpect(jsonPath("$.jobExecutions[0].jobExecution.stepExecutions[0].stepName").value("s1"));
	}
Tests REST compliance of {@link BatchJobInstancesController} endpoints.

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