@Test
public void testGetVersionedDistributions() throws Exception {

    // Setup:
    Version version = versionFactory.createNew(VERSION_IRI);
    Distribution dist = distributionFactory.createNew(DISTRIBUTION_IRI);
    version.setVersionedDistribution(Collections.singleton(dist));
    doReturn(version).when(utilsService).getVersion(eq(distributedCatalogId), eq(VERSIONED_RECORD_IRI), eq(VERSION_IRI), eq(versionFactory), any(RepositoryConnection.class));
    Set<Distribution> distributions = manager.getVersionedDistributions(distributedCatalogId, VERSIONED_RECORD_IRI, VERSION_IRI);
    verify(utilsService).getVersion(eq(distributedCatalogId), eq(VERSIONED_RECORD_IRI), eq(VERSION_IRI), eq(versionFactory), any(RepositoryConnection.class));
    version.getVersionedDistribution_resource().forEach(resource -> verify(utilsService).getExpectedObject(eq(resource), eq(distributionFactory), any(RepositoryConnection.class)));
    assertEquals(1, distributions.size());
}