@Test
public void testGroovyCronTaskConfiguration()
        throws Exception
{

    CronTaskConfigurationForm cronTaskConfigurationForm = new CronTaskConfigurationForm();
    cronTaskConfigurationForm.setJobClass(GroovyCronJob.class.getName());
    cronTaskConfigurationForm.setCronExpression("0 11 11 11 11 ? 2100");
    Headers headers = mockMvc.contentType(MediaType.APPLICATION_JSON_VALUE)
                             .accept(MediaType.APPLICATION_JSON_VALUE)
                             .body(cronTaskConfigurationForm)
                             .when()
                             .put(getContextBaseUrl())
                             .peek()
                             .then()
                             .statusCode(HttpStatus.OK.value())
                             .and()
                             .extract()
                             .headers();
    UUID cronUuid = UUID.fromString(headers.getValue(HEADER_NAME_CRON_TASK_ID));
    assertThat(cronUuid).isNotNull();
    uploadGroovyScript(cronUuid);
    deleteConfig(cronUuid);
}