archivaConfigControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfig = (ArchivaConfiguration) archivaConfigControl.getMock();
DefaultManagedRepositoryAdmin defaultManagedRepositoryAdmin = new DefaultManagedRepositoryAdmin();
defaultManagedRepositoryAdmin.setArchivaConfiguration( archivaConfig );
DefaultProxyConnectorAdmin defaultProxyConnectorAdmin = new DefaultProxyConnectorAdmin();
defaultProxyConnectorAdmin.setArchivaConfiguration( archivaConfig );
search = new MavenRepositorySearch( plexusSisuBridge, defaultManagedRepositoryAdmin, mavenIndexerUtils,
defaultProxyConnectorAdmin );
nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
artifactContextProducer = plexusSisuBridge.lookup( ArtifactContextProducer.class );
defaultManagedRepositoryAdmin.setMavenIndexerUtils( mavenIndexerUtils );
defaultManagedRepositoryAdmin.setIndexer( nexusIndexer );
defaultManagedRepositoryAdmin.setIndexCreators( mavenIndexerUtils.getAllIndexCreators() );
config = new Configuration();
config.addManagedRepository( createRepositoryConfig( TEST_REPO_1 ) );
config.addManagedRepository( createRepositoryConfig( TEST_REPO_2 ) );
config.addManagedRepository( createRepositoryConfig( REPO_RELEASE ) );