@Test
	public void testJobDestroyAll() 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());
		assertNotNull(jobDefinitionRepository.findOne("job1"));
		assertNotNull(jobDefinitionRepository.findOne("job2"));

		// Perform destroy all
		mockMvc.perform(delete("/jobs/definitions").accept(MediaType.APPLICATION_JSON)).andExpect(status().isOk());

		assertNull(jobDefinitionRepository.findOne("job1"));
		assertNull(jobDefinitionRepository.findOne("job2"));
	}
Tests REST compliance of jobs-related endpoints.

@author Glenn Renfro
@author Ilayaperumal Gopinathan
@author Mark Fisher
@author Florent Biville
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/JobsControllerIntegrationTests.java