@Test void testGetRepositoryCollections() { RepositoryCollection decoratedRepositoryCollection = mock(RepositoryCollection.class); RepositoryCollection repositoryCollection = mock(RepositoryCollection.class); when(repositoryCollectionDecoratorFactory.createDecoratedRepositoryCollection( repositoryCollection)) .thenReturn(decoratedRepositoryCollection); String repositoryCollectionName = "MyRepositoryCollectionName"; when(repositoryCollection.getName()).thenReturn(repositoryCollectionName); repositoryCollectionRegistry.addRepositoryCollection(repositoryCollection); assertEquals( singletonList(decoratedRepositoryCollection), repositoryCollectionRegistry.getRepositoryCollections().collect(toList())); }
public Stream<RepositoryCollection> getRepositoryCollections() { return repoCollectionMap.values().stream() .map(repoCollectionDecoratorFactory::createDecoratedRepositoryCollection); }
RepositoryCollectionRegistry { public Stream<RepositoryCollection> getRepositoryCollections() { return repoCollectionMap.values().stream() .map(repoCollectionDecoratorFactory::createDecoratedRepositoryCollection); } }
RepositoryCollectionRegistry { public Stream<RepositoryCollection> getRepositoryCollections() { return repoCollectionMap.values().stream() .map(repoCollectionDecoratorFactory::createDecoratedRepositoryCollection); } RepositoryCollectionRegistry(
      RepositoryCollectionDecoratorFactory repoCollectionDecoratorFactory); }
RepositoryCollectionRegistry { public Stream<RepositoryCollection> getRepositoryCollections() { return repoCollectionMap.values().stream() .map(repoCollectionDecoratorFactory::createDecoratedRepositoryCollection); } RepositoryCollectionRegistry(
      RepositoryCollectionDecoratorFactory repoCollectionDecoratorFactory); Stream<RepositoryCollection> getRepositoryCollections(); void addRepositoryCollection(RepositoryCollection repoCollection); RepositoryCollection getRepositoryCollection(String name); boolean hasRepositoryCollection(String name); RepositoryCollection getDefaultRepoCollection(); }
RepositoryCollectionRegistry { public Stream<RepositoryCollection> getRepositoryCollections() { return repoCollectionMap.values().stream() .map(repoCollectionDecoratorFactory::createDecoratedRepositoryCollection); } RepositoryCollectionRegistry(
      RepositoryCollectionDecoratorFactory repoCollectionDecoratorFactory); Stream<RepositoryCollection> getRepositoryCollections(); void addRepositoryCollection(RepositoryCollection repoCollection); RepositoryCollection getRepositoryCollection(String name); boolean hasRepositoryCollection(String name); RepositoryCollection getDefaultRepoCollection();  }