@Test
public void createUnversionedDistributionWithErrorTest() {

    // Setup:
    FormDataMultiPart fd = new FormDataMultiPart().field("title", "Title");
    doThrow(new MobiException()).when(catalogManager).createDistribution(any(DistributionConfig.class));
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(RECORD_IRI) + "/distributions")
            .request().post(Entity.entity(fd, MediaType.MULTIPART_FORM_DATA));
    assertEquals(response.getStatus(), 500);
}