@Test
public void getVersionedDistributionWithErrorTest() {

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