@Test
public void getUnversionedDistributionWithErrorTest() {

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