@Test
	public void testGetPagedBatchJobsWithLimit() throws Exception {
		mockMvc.perform(
				post("/jobs/definitions").param("name", "job1").param("definition", JOB_DEFINITION)
				.accept(MediaType.APPLICATION_JSON))
				.andExpect(status().isCreated());
		mockMvc.perform(
				post("/jobs/definitions").param("name", "job2").param("definition", JOB_DEFINITION)
				.accept(MediaType.APPLICATION_JSON))
				.andExpect(status().isCreated());
		mockMvc.perform(
				post("/jobs/definitions").param("name", "job3").param("definition", JOB_DEFINITION)
				.accept(MediaType.APPLICATION_JSON))
				.andExpect(status()
				.isCreated());
		mockMvc.perform(
				get("/jobs/configurations").param("page", "0").param("size", "2")
				.accept(MediaType.APPLICATION_JSON))
				.andExpect(status().isOk())
				.andExpect(jsonPath("$.content", Matchers.hasSize(2)))
				.andExpect(jsonPath("$.page.size", equalTo(2)))
				.andExpect(jsonPath("$.page.number", equalTo(0)))
				.andExpect(jsonPath("$.page.totalElements", equalTo(3)))
				.andExpect(jsonPath("$.page.totalPages", equalTo(2)));
		mockMvc.perform(
				get("/jobs/configurations").param("page", "1").param("size", "2")
				.accept(MediaType.APPLICATION_JSON))
				.andExpect(status().isOk())
				.andExpect(jsonPath("$.content", Matchers.hasSize(1)))
				.andExpect(jsonPath("$.page.size", equalTo(2)))
				.andExpect(jsonPath("$.page.number", equalTo(1)))
				.andExpect(jsonPath("$.page.totalElements", equalTo(3)))
				.andExpect(jsonPath("$.page.totalPages", equalTo(2)));
	}
Tests REST compliance of {@link BatchJobsController} endpoints.

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