public void test_aggregateRemoteArtifactRepositories()
{
final List<ArtifactRepository> externalRepos = new ArrayList<ArtifactRepository>();
final ArtifactRepository er1 =
repoFactory.createArtifactRepository( "test.1", "http://test.com/path", layout, null, null );
externalRepos.add( er1 );
final ArtifactRepository er2 =
repoFactory.createArtifactRepository( "test.2", "http://test2.com/path", layout, null, null );
externalRepos.add( er2 );
final List<ArtifactRepository> projectRepos = new ArrayList<ArtifactRepository>();
final ArtifactRepository pr1 =
repoFactory.createArtifactRepository( "project.1", "http://test.com/project", layout, null, null );
projectRepos.add( pr1 );
final ArtifactRepository pr2 =
repoFactory.createArtifactRepository( "project.2", "http://test2.com/path", layout, null, null );
projectRepos.add( pr2 );
final MavenProject project = createMavenProject( "group", "artifact", "1", new File( "base" ) );
project.setRemoteArtifactRepositories( projectRepos );
final List<ArtifactRepository> aggregated =
new DefaultDependencyResolver( resolver, metadataSource, factory, collector, logger ).aggregateRemoteArtifactRepositories( externalRepos,
Collections.singleton( project ) );
assertRepositoryWithId( er1.getId(), aggregated, true );
assertRepositoryWithId( er2.getId(), aggregated, true );
assertRepositoryWithId( pr1.getId(), aggregated, true );
assertRepositoryWithId( pr2.getId(), aggregated, false );
}