@Test
public void updateRecordWithErrorTest() {

    // Setup:
    JSONObject record = new JSONObject().element("@id", RECORD_IRI)
            .element("@type", new JSONArray().element(Record.TYPE));
    doThrow(new MobiException()).when(catalogManager).updateRecord(eq(vf.createIRI(LOCAL_IRI)), any(Record.class));
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(RECORD_IRI))
            .request().put(Entity.json(record.toString()));
    assertEquals(response.getStatus(), 500);
}