@Test
public void getMissingVersionedDistributionTest() {

    // Setup:
    when(catalogManager.getVersionedDistribution(vf.createIRI(LOCAL_IRI), vf.createIRI(RECORD_IRI), vf.createIRI(VERSION_IRI), vf.createIRI(ERROR_IRI))).thenReturn(Optional.empty());
    Response response = target().path("catalogs/" + encode(LOCAL_IRI) + "/records/" + encode(RECORD_IRI)
            + "/versions/" + encode(VERSION_IRI) + "/distributions/" + encode(ERROR_IRI))
            .request().get();
    assertEquals(response.getStatus(), 404);
}