@Test
public void testGetUnversionedDistributions() throws Exception {

    // Setup:
    UnversionedRecord record = unversionedRecordFactory.createNew(UNVERSIONED_RECORD_IRI);
    Distribution dist = distributionFactory.createNew(DISTRIBUTION_IRI);
    record.setUnversionedDistribution(Collections.singleton(dist));
    doReturn(record).when(utilsService).getRecord(eq(distributedCatalogId), eq(UNVERSIONED_RECORD_IRI), eq(unversionedRecordFactory), any(RepositoryConnection.class));
    Set<Distribution> distributions = manager.getUnversionedDistributions(distributedCatalogId, record.getResource());
    verify(utilsService).getRecord(eq(distributedCatalogId), eq(UNVERSIONED_RECORD_IRI), eq(unversionedRecordFactory), any(RepositoryConnection.class));
    record.getUnversionedDistribution_resource().forEach(resource -> verify(utilsService).getExpectedObject(eq(resource), eq(distributionFactory), any(RepositoryConnection.class)));
    assertEquals(1, distributions.size());
}