@Test
public void getBranchWithErrorTest() {

    // Setup:
    doThrow(new MobiException()).when(catalogManager).getBranch(vf.createIRI(LOCAL_IRI), vf.createIRI(RECORD_IRI), vf.createIRI(BRANCH_IRI), branchFactory);
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(RECORD_IRI)
            + "/branches/" + encode(BRANCH_IRI)).request().get();
    assertEquals(response.getStatus(), 500);
}