@Test
public void testUpdateEventScheduling() throws IOException {

  String jsonString = IOUtils.toString(getClass().getResource("/event-scheduling-update.json"), UTF_8);
  String eventId = TestEventsEndpoint.SCHEDULING_UPDATE_EVENT;
  given().formParam("scheduling", jsonString).pathParam("event_id", eventId)
      .expect().statusCode(SC_NO_CONTENT).when().put(env.host("{event_id}/scheduling"));
  SchedulingUtils.SchedulingInfo schedulingInfo = new SchedulingUtils.SchedulingInfo();
  schedulingInfo.setAgentId(TestEventsEndpoint.getCapturedAgentId().getValue());
  schedulingInfo.setStartDate(TestEventsEndpoint.getCapturedStartDate().getValue());
  schedulingInfo.setEndDate(TestEventsEndpoint.getCapturedEndDate().getValue());
  if (TestEventsEndpoint.getCapturedAgentConfig().getValue().isSome()) {
    schedulingInfo.setInputs(Opt.some(TestEventsEndpoint.getCapturedAgentConfig()
        .getValue().get().get(CaptureParameters.CAPTURE_DEVICE_NAMES)));
  }
  assertThat(schedulingInfo.toJson().toString(), SameJSONAs.sameJSONAs(jsonString).allowingAnyArrayOrdering());
}