@Test
public void testRemoveVersionedDistribution() throws Exception {

    // Setup:
    IRI distributionIRI = VALUE_FACTORY.createIRI(Version.versionedDistribution_IRI);
    try (RepositoryConnection conn = repo.getConnection()) {
        assertTrue(conn.getStatements(VERSION_IRI, distributionIRI, DISTRIBUTION_IRI, VERSION_IRI).hasNext());
        manager.removeVersionedDistribution(distributedCatalogId, VERSIONED_RECORD_IRI, VERSION_IRI, DISTRIBUTION_IRI);
        verify(utilsService).getVersionedDistribution(eq(distributedCatalogId), eq(VERSIONED_RECORD_IRI), eq(VERSION_IRI), eq(DISTRIBUTION_IRI), any(RepositoryConnection.class));
        verify(utilsService).removeObjectWithRelationship(eq(DISTRIBUTION_IRI), eq(VERSION_IRI),
                eq(Version.versionedDistribution_IRI), any(RepositoryConnection.class));
    }
}