@Test
public void getLatestVersionWithIncorrectPathTest() {

    // Setup:
    doThrow(new IllegalArgumentException()).when(catalogManager).getLatestVersion(vf.createIRI(LOCAL_IRI), vf.createIRI(ERROR_IRI), versionFactory);
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(ERROR_IRI) + "/versions/latest")
            .request().get();
    assertEquals(response.getStatus(), 400);
}