@Test
	public void testEmptyCronExpression() throws Exception {
		final CronValidation cronValidation = new CronValidation();
		cronValidation.setCronExpression("");
		mockMvc.perform(
				post("/validation/cron").content(new ObjectMapper().writeValueAsString(cronValidation)).accept(
						MediaType.APPLICATION_JSON).contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk()).andExpect(
				jsonPath("$.cronExpression", isEmptyString())).andExpect(
				jsonPath("$.valid", equalTo(false))).andExpect(
				jsonPath("$.errorMessage",
						equalToIgnoringCase("The cron expression must not be empty."))).andExpect(
				jsonPath("$.nextExecutionTime", nullValue()));
	}
Tests REST compliance of validation endpoint.

@author Gunnar Hillert
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/rest/validation/ValidationControllerIntegrationTests.java