]> source.dussan.org Git - archiva.git/commitdiff
added test cases to AdministrationServiceImplTest
authorMaria Odea B. Ching <oching@apache.org>
Thu, 9 Oct 2008 05:33:44 +0000 (05:33 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Thu, 9 Oct 2008 05:33:44 +0000 (05:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches@703062 13f79535-47bb-0310-9956-ffa450edef68

MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/AdministrationService.java
MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml
MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/test/java/org/apache/archiva/web/xmlrpc/services/AdministrationServiceImplTest.java

index 1086d64fd1d487546d48f1f940aadbeb466bef7c..260bef8fdc3e29f229e7df1569f8f0841affb9d9 100644 (file)
@@ -29,22 +29,78 @@ import com.atlassian.xmlrpc.ServiceObject;
 @ServiceObject( "Administration" )
 public interface AdministrationService
 {
-    public boolean executeRepositoryScanner( String repoId );
-
-    public boolean executeDatabaseScanner();
+    /**
+     * Executes repository scanner on the given repository.
+     *  
+     * @param repoId id of the repository to be scanned
+     * @return
+     * @throws Exception
+     */
+    public boolean executeRepositoryScanner( String repoId ) throws Exception;
+   
+    /**
+     * Executes the database scanner.
+     * 
+     * @return
+     * @throws Exception
+     */
+    public boolean executeDatabaseScanner() throws Exception;
 
+    /**
+     * Gets all available database consumers.
+     * @return
+     */
     public List<String> getAllDatabaseConsumers();
+   
+    /**
+     * Configures (enable or disable) database consumer.
+     * 
+     * @param consumerId id of the database consumer
+     * @param enable flag whether to enable or disable the specified consumer
+     * @return
+     * @throws Exception
+     */
+    public boolean configureDatabaseConsumer( String consumerId, boolean enable ) throws Exception;
 
-    public boolean configureDatabaseConsumer( String consumerId, boolean enable );
-
-    // TODO should we already implement config of consumers per repository?
-    public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable );
-
+    /**
+     * Gets all available repository consumers.
+     * 
+     * @return
+     */
     public List<String> getAllRepositoryConsumers();
+    
+    // TODO should we already implement config of consumers per repository?
+    public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ) throws Exception;
 
+    /**
+     * Gets all managed repositories.
+     * 
+     * @return
+     */
     public List<ManagedRepository> getAllManagedRepositories();
 
+    /**
+     * Gets all remote repositories.
+     * 
+     * @return
+     */
     public List<RemoteRepository> getAllRemoteRepositories();
 
-    public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version );
+    /**
+     * Deletes given artifact from the specified repository.
+     * 
+     * @param repoId id of the repository where the artifact to be deleted resides
+     * @param groupId groupId of the artifact to be deleted
+     * @param artifactId artifactId of the artifact to be deleted
+     * @param version version of the artifact to be deleted
+     * @return
+     * @throws Exception
+     */
+    public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version )
+        throws Exception;
+    
+    //TODO 
+    // consider the following as additional services:
+    // - getAllConfiguredRepositoryConsumers( String repoId ) - list all enabled consumers for the repo
+    // - getAllConfiguredDatabaseConsumers() - list all enabled db consumers
 }
index b657132b0b7ca27eafd34bc05fffe8a748ba6f7f..8d68c8df35a34c64695fefe4a23d7353ddd0e92b 100644 (file)
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-configuration</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.archiva</groupId>
+      <artifactId>archiva-scheduled</artifactId>
+    </dependency>
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
index 7400f48f18e4fe7aeee799d2a59d62e016389a35..17a4be09364606d6f1ab32edb119bb6e88f93888 100644 (file)
@@ -35,7 +35,7 @@ public class AdministrationServiceImpl
      */
     private ArchivaConfiguration archivaConfiguration;
     
-    public boolean configureDatabaseConsumer( String consumerId, boolean enable )
+    public boolean configureDatabaseConsumer( String consumerId, boolean enable ) throws Exception
     {
         //Configuration config = archivaConfiguration.getConfiguration();
         
@@ -44,25 +44,27 @@ public class AdministrationServiceImpl
         return false;
     }
 
-    public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable )
+    public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable ) throws Exception
     {
         // TODO Auto-generated method stub
         return false;
     }
 
-    public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version )
+    public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version ) throws Exception
     {
+        // TODO implement delete artifact in Archiva
+        
         // TODO Auto-generated method stub
         return false;
     }
 
-    public boolean executeDatabaseScanner()
+    public boolean executeDatabaseScanner() throws Exception
     {
         // TODO Auto-generated method stub
         return false;
     }
 
-    public boolean executeRepositoryScanner( String repoId )
+    public boolean executeRepositoryScanner( String repoId ) throws Exception
     {
         // TODO Auto-generated method stub
         return false;
index 17f15b08e58781072b2499723f6e311c0f4e8571..ca1cf4fea48c84824b411e9484e1375a0714cf24 100644 (file)
@@ -31,6 +31,9 @@ import org.apache.maven.archiva.configuration.DatabaseScanningConfiguration;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
 import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration;
+import org.apache.maven.archiva.scheduled.ArchivaTaskScheduler;
+import org.apache.maven.archiva.scheduled.tasks.DatabaseTask;
+import org.apache.maven.archiva.scheduled.tasks.RepositoryTask;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.easymock.MockControl;
 import org.easymock.classextension.MockClassControl;
@@ -52,6 +55,10 @@ public class AdministrationServiceImplTest
     
     private AdministrationService service;
     
+    private MockControl taskSchedulerControl;
+    
+    private ArchivaTaskScheduler taskScheduler;
+        
     protected void setUp()
         throws Exception
     {
@@ -63,10 +70,14 @@ public class AdministrationServiceImplTest
         configControl = MockClassControl.createControl( Configuration.class );
         config = ( Configuration ) configControl.getMock();      
         
+        taskSchedulerControl = MockControl.createControl( ArchivaTaskScheduler.class );
+        taskScheduler = ( ArchivaTaskScheduler ) taskSchedulerControl.getMock();
+        
         service = new AdministrationServiceImpl();
     }
-    
-    public void testConfigureValidDatabaseConsumer()
+        
+  // DATABASE CONSUMERS
+    public void testGetAllDbConsumers()
         throws Exception
     {
         /*DatabaseScanningConfiguration dbScanning = new DatabaseScanningConfiguration();
@@ -75,6 +86,36 @@ public class AdministrationServiceImplTest
         dbScanning.addUnprocessedConsumer( "unprocessed-artifacts" );
         dbScanning.addUnprocessedConsumer( "unprocessed-poms" );
         
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
+        
+        archivaConfigControl.replay();
+        configControl.replay();
+        
+        List<String> dbConsumers = service.getAllDatabaseConsumers(); 
+        
+        archivaConfigControl.verify();
+        configControl.verify();
+        
+        assertNotNull( dbConsumers );
+        assertEquals( 4, dbConsumers.size() );
+        assertTrue( dbConsumers.contains( "cleanup-index" ) );
+        assertTrue( dbConsumers.contains( "cleanup-database" ) );
+        assertTrue( dbConsumers.contains( "unprocessed-artifacts" ) );
+        assertTrue( dbConsumers.contains( "unprocessed-poms" ) );*/
+    }
+    
+/*    public void testConfigureValidDatabaseConsumer()
+        throws Exception
+    {
+        DatabaseScanningConfiguration dbScanning = new DatabaseScanningConfiguration();
+        dbScanning.addCleanupConsumer( "cleanup-index" );
+        dbScanning.addCleanupConsumer( "cleanup-database" );
+        dbScanning.addUnprocessedConsumer( "unprocessed-artifacts" );
+        dbScanning.addUnprocessedConsumer( "unprocessed-poms" );
+     
+      //TODO mock checking whether the db consumer is valid or not
+        
      // test enable
         archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
         configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
@@ -89,17 +130,25 @@ public class AdministrationServiceImplTest
         archivaConfigControl.replay();
         configControl.replay();
         
-        boolean success = service.configureDatabaseConsumer( "new-cleanup-consumer", true ); 
+        try
+        {
+            boolean success = service.configureDatabaseConsumer( "new-cleanup-consumer", true );
+            assertTrue( success );
+        }
+        catch ( Exception e )
+        {
+            fail( "An exception should not have been thrown." );
+        }
         
         archivaConfigControl.verify();
         configControl.verify();
-        
-        assertTrue( success );
-        
+                
       // test disable 
         archivaConfigControl.reset();
         configControl.reset();
         
+      //TODO mock checking whether the db consumer is valid or not
+        
         archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
         configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
         
@@ -113,130 +162,323 @@ public class AdministrationServiceImplTest
         archivaConfigControl.replay();
         configControl.replay();
         
-        success = service.configureDatabaseConsumer( "new-cleanup-consumer", false ); 
+        try
+        {
+            boolean success = service.configureDatabaseConsumer( "new-cleanup-consumer", false );
+            assertTrue( success );
+        }
+        catch ( Exception e )
+        {
+            fail( "An exception should not have been thrown." );
+        }
         
         archivaConfigControl.verify();
         configControl.verify();
-        
-        assertTrue( success );*/
     }
     
     public void testConfigureInvalidDatabaseConsumer()
         throws Exception
     {
+        //TODO mock checking whether the db consumer is valid or not
+        
+        try
+        {
+            service.configureDatabaseConsumer( "invalid-consumer", true );
+            fail( "An exception should have been thrown." );
+        }
+        catch ( Exception e )
+        {
+            assertEquals( "Invalid database consumer.", e.getMessage() );
+        }
+    }
+    
+ // REPOSITORY CONSUMERS
+    public void testGetAllRepoConsumers()
+        throws Exception
+    {
+        RepositoryScanningConfiguration repoScanning = new RepositoryScanningConfiguration();
+        repoScanning.addKnownContentConsumer( "index-artifacts" );
+        repoScanning.addKnownContentConsumer( "index-poms" );
+        repoScanning.addKnownContentConsumer( "fix-checksums" );
+        repoScanning.addInvalidContentConsumer( "check-poms" );
+        repoScanning.addInvalidContentConsumer( "check-metadata" );
+        
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.getRepositoryScanning(), repoScanning );
         
+        archivaConfigControl.replay();
+        configControl.replay();
+        
+        List<String> repoConsumers = service.getAllDatabaseConsumers(); 
+        
+        archivaConfigControl.verify();
+        configControl.verify();
+        
+        assertNotNull( repoConsumers );
+        assertEquals( 5, repoConsumers.size() );
+        assertTrue( repoConsumers.contains( "index-artifacts" ) );
+        assertTrue( repoConsumers.contains( "index-poms" ) );
+        assertTrue( repoConsumers.contains( "fix-checksums" ) );
+        assertTrue( repoConsumers.contains( "check-poms" ) );
+        assertTrue( repoConsumers.contains( "check-metadata" ) );
     }
     
     public void testConfigureValidRepositoryConsumer()
         throws Exception
     {
-        // test enable & disable
+        //TODO mock checking whether the repo consumer is valid or not
+                
+        RepositoryScanningConfiguration repoScanning = new RepositoryScanningConfiguration();
+        repoScanning.addKnownContentConsumer( "index-artifacts" );
+        repoScanning.addKnownContentConsumer( "index-poms" );
+        repoScanning.addKnownContentConsumer( "fix-checksums" );
+        repoScanning.addInvalidContentConsumer( "check-poms" );
+        repoScanning.addInvalidContentConsumer( "check-metadata" );
+        
+     // test enable
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.getRepositoryScanning(), repoScanning );
+        
+        config.setRepositoryScanning( repoScanning );
+        
+        configControl.setMatcher( MockControl.ALWAYS_MATCHER );
+        configControl.setVoidCallable();
+        
+        archivaConfig.save( config );
+        archivaConfigControl.setVoidCallable();
+        
+        archivaConfigControl.replay();
+        configControl.replay();
+        
+        try
+        {
+            boolean success = service.configureRepositoryConsumer( null, "new-repo-consumer", true );
+            assertTrue( success );
+        }
+        catch ( Exception e )
+        {
+            fail( "An exception should not have been thrown." );
+        }
+        
+        archivaConfigControl.verify();
+        configControl.verify();
+                
+      // test disable 
+        archivaConfigControl.reset();
+        configControl.reset();
+        
+      //TODO mock checking whether the repo consumer is valid or not
+        
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.getRepositoryScanning(), repoScanning );
+        
+        config.setRepositoryScanning( repoScanning );
+        configControl.setMatcher( MockControl.ALWAYS_MATCHER );
+        configControl.setVoidCallable();
+        
+        archivaConfig.save( config );
+        archivaConfigControl.setVoidCallable();
+        
+        archivaConfigControl.replay();
+        configControl.replay();
+        
+        try
+        {
+            boolean success = service.configureRepositoryConsumer( null, "new-repo-consumer", false );
+            assertTrue( success );
+        }
+        catch ( Exception e )
+        {
+            fail( "An excecption should not have been thrown." );
+        }
+        
+        archivaConfigControl.verify();
+        configControl.verify();        
     }
     
     public void testConfigureInvalidRepositoryConsumer()
         throws Exception
     {
-    
+        //TODO mock checking whether the repo consumer is valid or not
+        
+        try
+        {
+            service.configureRepositoryConsumer( null, "invalid-consumer", true );
+            fail( "An exception should have been thrown." );
+        }
+        catch ( Exception e )
+        {
+            assertEquals( "Invalid database consumer.", e.getMessage() );
+        }
     }
+
+// DELETE ARTIFACT
     
     public void testDeleteArtifactArtifactExists()
         throws Exception
     {
-    
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ),
+                                       createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
+        
+        // TODO 
+        // - mock checking of artifact existence in the repo
+        // - mock artifact delete
+        
+        archivaConfigControl.replay();
+        configControl.replay();
+       
+        try
+        {
+            boolean success = service.deleteArtifact( "internal", "org.apache.archiva", "archiva-test", "1.0" );
+            assertTrue( success ); 
+        }
+        catch ( Exception e )
+        {
+            fail( "An exception should not have been thrown." );
+        }
+        
+        archivaConfigControl.verify();
+        configControl.verify();
     }
     
     public void testDeleteArtifactArtifactDoesNotExist()
         throws Exception
     {
-    
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ),
+                                       createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
+        
+        // TODO mock checking of artifact existence in the repo
+        
+        archivaConfigControl.replay();
+        configControl.replay();
+       
+        try
+        {
+            service.deleteArtifact( "internal", "org.apache.archiva", "archiva-test", "1.0" );
+            fail( "An exception should have been thrown." );
+        }
+        catch ( Exception e )
+        {
+            assertEquals( "Artifact does not exist.", e.getMessage() );
+        }
+        
+        archivaConfigControl.verify();
+        configControl.verify();
     }
     
     public void testDeleteArtifacRepositoryDoesNotExist()
         throws Exception
     {
-    
-    }
-    
-    public void testExecuteRepoScannerRepoExists()
-        throws Exception
-    {
-    
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ), null );
+        
+        archivaConfigControl.replay();
+        configControl.replay();
+       
+        try
+        {
+            service.deleteArtifact( "internal", "org.apache.archiva", "archiva-test", "1.0" );
+            fail( "An exception should have been thrown." );
+        }
+        catch ( Exception e )
+        {
+            assertEquals( "Repository does not exist.", e.getMessage() );
+        }
+        
+        archivaConfigControl.verify();
+        configControl.verify();
     }
     
-    public void testExecuteRepoScannerRepoDoesNotExist()
-        throws Exception
-    {
-    
-    }
+// REPO SCANNING
     
-    public void testExecuteDbScanner()
+    public void testExecuteRepoScannerRepoExists()
         throws Exception
-    {
+    {        
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
+        configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ),
+                                       createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
         
-    }
-    
-    public void testGetAllDbConsumers()
-        throws Exception
-    {
-        /*DatabaseScanningConfiguration dbScanning = new DatabaseScanningConfiguration();
-        dbScanning.addCleanupConsumer( "cleanup-index" );
-        dbScanning.addCleanupConsumer( "cleanup-database" );
-        dbScanning.addUnprocessedConsumer( "unprocessed-artifacts" );
-        dbScanning.addUnprocessedConsumer( "unprocessed-poms" );
+        RepositoryTask task = new RepositoryTask();
         
-        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
-        configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
+        taskSchedulerControl.expectAndReturn( taskScheduler.isProcessingAnyRepositoryTask(), false );
+        taskSchedulerControl.expectAndReturn( taskScheduler.isProcessingRepositoryTask( "internal" ), false );
+        
+        taskScheduler.queueRepositoryTask( task );
+        taskSchedulerControl.setMatcher( MockControl.ALWAYS_MATCHER );
+        taskSchedulerControl.setVoidCallable();
         
         archivaConfigControl.replay();
         configControl.replay();
-        
-        List<String> dbConsumers = service.getAllDatabaseConsumers(); 
+        taskSchedulerControl.replay();
+
+        try
+        {
+            boolean success = service.executeRepositoryScanner( "internal" );
+            assertTrue( success );
+        }
+        catch ( Exception e )
+        {
+            fail( "An exception should not have been thrown." );
+        }
         
         archivaConfigControl.verify();
         configControl.verify();
-        
-        assertNotNull( dbConsumers );
-        assertEquals( 4, dbConsumers.size() );
-        assertTrue( dbConsumers.contains( "cleanup-index" ) );
-        assertTrue( dbConsumers.contains( "cleanup-database" ) );
-        assertTrue( dbConsumers.contains( "unprocessed-artifacts" ) );
-        assertTrue( dbConsumers.contains( "unprocessed-poms" ) );*/
+        taskSchedulerControl.verify();
     }
     
-    public void testGetAllRepoConsumers()
+    public void testExecuteRepoScannerRepoDoesNotExist()
         throws Exception
     {
-        /*RepositoryScanningConfiguration repoScanning = new RepositoryScanningConfiguration();
-        repoScanning.addKnownContentConsumer( "index-artifacts" );
-        repoScanning.addKnownContentConsumer( "index-poms" );
-        repoScanning.addKnownContentConsumer( "fix-checksums" );
-        repoScanning.addInvalidContentConsumer( "check-poms" );
-        repoScanning.addInvalidContentConsumer( "check-metadata" );
-        
         archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
-        configControl.expectAndReturn( config.getRepositoryScanning(), repoScanning );
+        configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ), null );
         
         archivaConfigControl.replay();
         configControl.replay();
-        
-        List<String> repoConsumers = service.getAllDatabaseConsumers(); 
+       
+        try
+        {
+            service.executeRepositoryScanner( "internal" );
+            fail( "An exception should have been thrown." );
+        }
+        catch ( Exception e )
+        {
+            assertEquals( "Repository does not exist.", e.getMessage() );
+        }
         
         archivaConfigControl.verify();
         configControl.verify();
+    }
+    
+ // DATABASE SCANNING
+    
+    public void testExecuteDbScanner()
+        throws Exception
+    {
+        DatabaseTask task = new DatabaseTask();
         
-        assertNotNull( repoConsumers );
-        assertEquals( 5, repoConsumers.size() );
-        assertTrue( repoConsumers.contains( "index-artifacts" ) );
-        assertTrue( repoConsumers.contains( "index-poms" ) );
-        assertTrue( repoConsumers.contains( "fix-checksums" ) );
-        assertTrue( repoConsumers.contains( "check-poms" ) );
-        assertTrue( repoConsumers.contains( "check-metadata" ) );*/
+        taskSchedulerControl.expectAndReturn( taskScheduler.isProcessingDatabaseTask(), false );
+                
+        taskScheduler.queueDatabaseTask( task );
+        taskSchedulerControl.setMatcher( MockControl.ALWAYS_MATCHER );
+        taskSchedulerControl.setVoidCallable();
+        
+        taskSchedulerControl.replay();
+
+        boolean success = service.executeDatabaseScanner();
+        
+        taskSchedulerControl.verify();        
+        
+        assertTrue( success );
     }
+     
+ // REPOSITORIES
     
     public void testGetAllManagedRepositories()
         throws Exception
     {
-        /*List<ManagedRepositoryConfiguration> managedRepos = new ArrayList<ManagedRepositoryConfiguration>();        
+        List<ManagedRepositoryConfiguration> managedRepos = new ArrayList<ManagedRepositoryConfiguration>();        
         managedRepos.add( createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
         managedRepos.add( createManagedRepo( "snapshots", "default", "Snapshots Repository", false, true ) );
         
@@ -255,13 +497,13 @@ public class AdministrationServiceImplTest
         assertEquals( 2, repos.size() );
                 
         assertManagedRepo( ( ManagedRepository ) repos.get( 0 ), managedRepos.get( 0 ) );
-        assertManagedRepo( ( ManagedRepository ) repos.get( 1 ), managedRepos.get( 1 ) );*/
+        assertManagedRepo( ( ManagedRepository ) repos.get( 1 ), managedRepos.get( 1 ) );
     }
 
     public void testGetAllRemoteRepositories()
         throws Exception
     {
-        /*List<RemoteRepositoryConfiguration> remoteRepos = new ArrayList<RemoteRepositoryConfiguration>(); 
+        List<RemoteRepositoryConfiguration> remoteRepos = new ArrayList<RemoteRepositoryConfiguration>(); 
         remoteRepos.add( createRemoteRepository( "central", "Central Repository", "default", "http://repo1.maven.org/maven2") );
         remoteRepos.add( createRemoteRepository( "dummy", "Dummy Remote Repository", "legacy", "http://dummy.com/dummy") );
         
@@ -280,9 +522,9 @@ public class AdministrationServiceImplTest
         assertEquals( 2, repos.size() );
          
         assertRemoteRepo( (RemoteRepository) repos.get( 0 ), remoteRepos.get( 0 ) );
-        assertRemoteRepo( (RemoteRepository) repos.get( 1 ), remoteRepos.get( 1 ) );        */
+        assertRemoteRepo( (RemoteRepository) repos.get( 1 ), remoteRepos.get( 1 ) );        
     }
-
+*/
     private void assertRemoteRepo( RemoteRepository remoteRepo, RemoteRepositoryConfiguration expectedRepoConfig )
     {
         assertEquals( expectedRepoConfig.getId(), remoteRepo.getId() );