@Test
public void testUpdateSchedule() throws Exception {
Schedule schedule = new Schedule();
schedule.setCollectionInterval(1234567);
schedule.setEnabled(true);
given()
.header(acceptJson)
.contentType(ContentType.JSON)
.pathParam("id", numericScheduleId)
.body(schedule)
.expect()
.statusCode(200)
.log().ifError()
.when()
.put("/metric/schedule/{id}");
// reset to original interval
schedule.setCollectionInterval(defaultInterval);
given()
.header(acceptJson)
.contentType(ContentType.JSON)
.pathParam("id", numericScheduleId)
.body(schedule)