@Test
public void getBranchesWithErrorTest() {

    // Setup:
    doThrow(new MobiException()).when(catalogManager).getBranches(vf.createIRI(LOCAL_IRI), vf.createIRI(RECORD_IRI));
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(RECORD_IRI) + "/branches")
            .queryParam("sort", DCTERMS.TITLE.stringValue()).request().get();
    assertEquals(response.getStatus(), 500);
}