@Test
public void getCommitHistoryTest() {

    Response response = target().path("commits/" + encode(COMMIT_IRIS[1]) + "/history")
            .request().get();
    assertEquals(response.getStatus(), 200);
    verify(catalogManager).getCommitChain(vf.createIRI(COMMIT_IRIS[1]));
    MultivaluedMap<String, Object> headers = response.getHeaders();
    assertEquals(headers.get("X-Total-Count").get(0), "" + COMMIT_IRIS.length);
    assertEquals(response.getLinks().size(), 0);
    try {
        JSONArray array = JSONArray.fromObject(response.readEntity(String.class));
        assertEquals(array.size(), COMMIT_IRIS.length);
        array.forEach(result -> {
            JSONObject commitObj = JSONObject.fromObject(result);
            assertTrue(commitObj.containsKey("id"));
            assertTrue(Arrays.asList(COMMIT_IRIS).contains(commitObj.getString("id")));
        });
    } catch (Exception e) {
        fail("Expected no exception, but got: " + e.getMessage());
    }
}