@Test void testGetRepositoryCollection() { 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( decoratedRepositoryCollection, repositoryCollectionRegistry.getRepositoryCollection(repositoryCollectionName)); }
public RepositoryCollection getRepositoryCollection(String name) { RepositoryCollection repoCollection = repoCollectionMap.get(name); return repoCollection != null ? repoCollectionDecoratorFactory.createDecoratedRepositoryCollection(repoCollection) : null; }
RepositoryCollectionRegistry { public RepositoryCollection getRepositoryCollection(String name) { RepositoryCollection repoCollection = repoCollectionMap.get(name); return repoCollection != null ? repoCollectionDecoratorFactory.createDecoratedRepositoryCollection(repoCollection) : null; } }
RepositoryCollectionRegistry { public RepositoryCollection getRepositoryCollection(String name) { RepositoryCollection repoCollection = repoCollectionMap.get(name); return repoCollection != null ? repoCollectionDecoratorFactory.createDecoratedRepositoryCollection(repoCollection) : null; } RepositoryCollectionRegistry(
      RepositoryCollectionDecoratorFactory repoCollectionDecoratorFactory); }
RepositoryCollectionRegistry { public RepositoryCollection getRepositoryCollection(String name) { RepositoryCollection repoCollection = repoCollectionMap.get(name); return repoCollection != null ? repoCollectionDecoratorFactory.createDecoratedRepositoryCollection(repoCollection) : null; } RepositoryCollectionRegistry(
      RepositoryCollectionDecoratorFactory repoCollectionDecoratorFactory); Stream<RepositoryCollection> getRepositoryCollections(); void addRepositoryCollection(RepositoryCollection repoCollection); RepositoryCollection getRepositoryCollection(String name); boolean hasRepositoryCollection(String name); RepositoryCollection getDefaultRepoCollection(); }
RepositoryCollectionRegistry { public RepositoryCollection getRepositoryCollection(String name) { RepositoryCollection repoCollection = repoCollectionMap.get(name); return repoCollection != null ? repoCollectionDecoratorFactory.createDecoratedRepositoryCollection(repoCollection) : null; } RepositoryCollectionRegistry(
      RepositoryCollectionDecoratorFactory repoCollectionDecoratorFactory); Stream<RepositoryCollection> getRepositoryCollections(); void addRepositoryCollection(RepositoryCollection repoCollection); RepositoryCollection getRepositoryCollection(String name); boolean hasRepositoryCollection(String name); RepositoryCollection getDefaultRepoCollection();  }