@Test
public void testGetEventsMetadata() throws Exception {

  given().formParam("eventIds", "").expect().statusCode(HttpStatus.SC_BAD_REQUEST).when()
    .post(rt.host("events/metadata.json"));
  given().formParam("eventIds", "[\"notExists\", \"notExists2\"]").expect().statusCode(HttpStatus.SC_NOT_FOUND).when()
    .post(rt.host("events/metadata.json"));
  String eventMetadataString = IOUtils.toString(getClass().getResource("/eventsMetadata.json"));
  String result = given().formParam("eventIds", "[\"notExists\", \"exists\", \"exists2\"]").expect().statusCode(HttpStatus.SC_OK)
    .when().post(rt.host("events/metadata.json")).asString();
  assertThat(eventMetadataString, SameJSONAs.sameJSONAs(result));
}