ArtifactRepositoryService { public List<? extends ArtifactRepository> getRepositories() { return this.repositories.stream().filter(ArtifactRepository::isRepository).collect(Collectors.toList()); } ArtifactRepositoryService(); @Inject  ArtifactRepositoryService(@Repository @Any Instance<ArtifactRepository> artifactRepositoryInstances); List<? extends ArtifactRepository> getRepositories(); List<? extends ArtifactRepository> getPomRepositories(); static final String LOCAL_M2_REPO_NAME; static final String GLOBAL_M2_REPO_NAME; static final String WORKSPACE_M2_REPO_NAME; static final String DISTRIBUTION_MANAGEMENT_REPO_NAME; static final String ORG_GUVNOR_M2REPO_DIR_PROPERTY; static final String GLOBAL_M2_REPO_URL; }
@Test public void testDeploymentRepositories() { List<? extends ArtifactRepository> repositories = this.artifactRepositoryService.getRepositories(); assertEquals(4, repositories.size()); assertTrue(Arrays.asList(this.artifactRepository1, this.artifactRepository2, this.artifactRepository3, this.artifactRepository4).containsAll(repositories)); assertFalse(repositories.contains(this.artifactRepository5)); }