@Test
public void getCompiledResourceEmptyModelTest() {

    List<Commit> emptyList = new ArrayList<>();
    Model expected = mf.createModel();
    when(catalogManager.getCompiledResource(any(List.class))).thenReturn(expected);
    when(catalogManager.getCommitEntityChain(any(Resource.class), any(Resource.class))).thenReturn(emptyList);
    Response response = target().path("commits/" + encode(COMMIT_IRIS[1]) + "/resource")
            .queryParam("entityId", encode("http://mobi.com/test/empty")).request().get();
    assertEquals(response.getStatus(), 200);
    verify(catalogManager).getCommitEntityChain(vf.createIRI(COMMIT_IRIS[1]), vf.createIRI("http://mobi.com/test/empty"));
    try {
        JSONArray result = JSONArray.fromObject(response.readEntity(String.class));
        assertTrue(result.size() == 0);
    } catch (Exception e) {
        fail("Expected no exception, but got: " + e.getMessage());
    }
}