@Test
public void testGetThemeUsage() throws ParseException {

  // Test invalid id
  given().pathParam("themeId", "asdasd").expect().statusCode(HttpStatus.SC_NOT_FOUND).when()
          .get(rt.host("/{themeId}/usage.json")).asString();
  // Test unknown id
  given().pathParam("themeId", notFoundId).expect().statusCode(HttpStatus.SC_NOT_FOUND).when()
          .get(rt.host("/{themeId}/usage.json")).asString();
  // Test correct id
  String result = given().pathParam("themeId", foundId).expect().statusCode(HttpStatus.SC_OK).when()
          .get(rt.host("/{themeId}/usage.json")).asString();
  JSONObject series = ((JSONObject) parser.parse(result));
  JSONArray seriesArr = (JSONArray) series.get("series");
  Assert.assertEquals(3, seriesArr.size());
  JSONObject series1 = (JSONObject) seriesArr.get(0);
  Assert.assertEquals("Series1Id", series1.get("id").toString());
  Assert.assertEquals("Series 1 Title", series1.get("title").toString());
}