@Test
public void createVersionedDistributionTest() {

    // Setup:
    FormDataMultiPart fd = new FormDataMultiPart();
    fd.field("title", "Title");
    fd.field("description", "Description");
    fd.field("format", "application/json");
    fd.field("accessURL", "http://example.com/Example");
    fd.field("downloadURL", "http://example.com/Example");
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(RECORD_IRI)
            + "/versions/" + encode(VERSION_IRI) + "/distributions")
            .request().post(Entity.entity(fd, MediaType.MULTIPART_FORM_DATA));
    assertEquals(response.getStatus(), 201);
    assertEquals(response.readEntity(String.class), DISTRIBUTION_IRI);
    verify(catalogManager).createDistribution(any(DistributionConfig.class));
    verify(catalogManager).addVersionedDistribution(eq(vf.createIRI(LOCAL_IRI)), eq(vf.createIRI(RECORD_IRI)), eq(vf.createIRI(VERSION_IRI)), any(Distribution.class));
}