1 package org.apache.archiva.web.xmlrpc.services;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import java.util.ArrayList;
23 import java.util.List;
25 import org.apache.archiva.web.xmlrpc.api.AdministrationService;
26 import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
27 import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
28 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
29 import org.apache.maven.archiva.configuration.Configuration;
30 import org.apache.maven.archiva.configuration.DatabaseScanningConfiguration;
31 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
32 import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration;
33 import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration;
34 import org.apache.maven.archiva.consumers.DatabaseCleanupConsumer;
35 import org.apache.maven.archiva.consumers.DatabaseUnprocessedArtifactConsumer;
36 import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
37 import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
38 import org.apache.maven.archiva.database.updater.DatabaseConsumers;
39 import org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers;
40 import org.apache.maven.archiva.scheduled.ArchivaTaskScheduler;
41 import org.apache.maven.archiva.scheduled.tasks.DatabaseTask;
42 import org.apache.maven.archiva.scheduled.tasks.RepositoryTask;
43 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
44 import org.easymock.MockControl;
45 import org.easymock.classextension.MockClassControl;
48 * AdministrationServiceImplTest
50 * @version $Id: AdministrationServiceImplTest.java
52 public class AdministrationServiceImplTest
53 extends PlexusInSpringTestCase
55 private MockControl archivaConfigControl;
57 private ArchivaConfiguration archivaConfig;
59 private MockControl configControl;
61 private Configuration config;
63 private AdministrationServiceImpl service;
65 private MockControl taskSchedulerControl;
67 private ArchivaTaskScheduler taskScheduler;
69 // repository consumers
70 private MockControl repoConsumerUtilsControl;
72 private RepositoryContentConsumers repoConsumersUtil;
74 private MockControl knownContentConsumerControl;
76 private MockControl invalidContentConsumerControl;
78 private KnownRepositoryContentConsumer indexArtifactConsumer;
80 private KnownRepositoryContentConsumer indexPomConsumer;
82 private InvalidRepositoryContentConsumer checkPomConsumer;
84 private InvalidRepositoryContentConsumer checkMetadataConsumer;
87 private MockControl dbConsumersUtilControl;
89 private DatabaseConsumers dbConsumersUtil;
91 private MockControl unprocessedConsumersControl;
93 private MockControl cleanupConsumersControl;
95 private DatabaseUnprocessedArtifactConsumer processArtifactConsumer;
97 private DatabaseUnprocessedArtifactConsumer processPomConsumer;
99 private DatabaseCleanupConsumer cleanupIndexConsumer;
101 private DatabaseCleanupConsumer cleanupDbConsumer;
103 protected void setUp()
108 archivaConfigControl = MockControl.createControl( ArchivaConfiguration.class );
109 archivaConfig = ( ArchivaConfiguration ) archivaConfigControl.getMock();
111 configControl = MockClassControl.createControl( Configuration.class );
112 config = ( Configuration ) configControl.getMock();
114 taskSchedulerControl = MockControl.createControl( ArchivaTaskScheduler.class );
115 taskScheduler = ( ArchivaTaskScheduler ) taskSchedulerControl.getMock();
118 repoConsumerUtilsControl = MockClassControl.createControl( RepositoryContentConsumers.class );
119 repoConsumersUtil = ( RepositoryContentConsumers ) repoConsumerUtilsControl.getMock();
121 knownContentConsumerControl = MockControl.createControl( KnownRepositoryContentConsumer.class );
122 indexArtifactConsumer = ( KnownRepositoryContentConsumer ) knownContentConsumerControl.getMock();
123 indexPomConsumer = ( KnownRepositoryContentConsumer ) knownContentConsumerControl.getMock();
125 invalidContentConsumerControl = MockControl.createControl( InvalidRepositoryContentConsumer.class );
126 checkPomConsumer = ( InvalidRepositoryContentConsumer ) invalidContentConsumerControl.getMock();
127 checkMetadataConsumer = ( InvalidRepositoryContentConsumer ) invalidContentConsumerControl.getMock();
130 dbConsumersUtilControl = MockClassControl.createControl( DatabaseConsumers.class );
131 dbConsumersUtil = ( DatabaseConsumers ) dbConsumersUtilControl.getMock();
133 cleanupConsumersControl = MockControl.createControl( DatabaseCleanupConsumer.class );
134 cleanupIndexConsumer = ( DatabaseCleanupConsumer ) cleanupConsumersControl.getMock();
135 cleanupDbConsumer = ( DatabaseCleanupConsumer ) cleanupConsumersControl.getMock();
137 unprocessedConsumersControl = MockControl.createControl( DatabaseUnprocessedArtifactConsumer.class );
138 processArtifactConsumer = ( DatabaseUnprocessedArtifactConsumer ) unprocessedConsumersControl.getMock();
139 processPomConsumer = ( DatabaseUnprocessedArtifactConsumer ) unprocessedConsumersControl.getMock();
141 service = new AdministrationServiceImpl();
142 service.setArchivaConfiguration( archivaConfig );
143 service.setRepoConsumersUtil( repoConsumersUtil );
144 service.setDbConsumersUtil( dbConsumersUtil );
147 /* Tests for database consumers */
149 public void testGetAllDbConsumers()
154 dbConsumersUtilControl.replay();
155 cleanupConsumersControl.replay();
156 unprocessedConsumersControl.replay();
158 List<String> dbConsumers = service.getAllDatabaseConsumers();
160 dbConsumersUtilControl.verify();
161 cleanupConsumersControl.verify();
162 unprocessedConsumersControl.verify();
164 assertNotNull( dbConsumers );
165 assertEquals( 4, dbConsumers.size() );
166 assertTrue( dbConsumers.contains( "cleanup-index" ) );
167 assertTrue( dbConsumers.contains( "cleanup-database" ) );
168 assertTrue( dbConsumers.contains( "process-artifact" ) );
169 assertTrue( dbConsumers.contains( "process-pom" ) );
172 public void testConfigureValidDatabaseConsumer()
175 DatabaseScanningConfiguration dbScanning = new DatabaseScanningConfiguration();
176 dbScanning.addCleanupConsumer( "cleanup-index" );
177 dbScanning.addCleanupConsumer( "cleanup-database" );
178 dbScanning.addUnprocessedConsumer( "process-artifact" );
182 // test enable "process-pom" db consumer
183 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
184 configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
186 config.setDatabaseScanning( dbScanning );
187 configControl.setMatcher( MockControl.ALWAYS_MATCHER );
188 configControl.setVoidCallable();
190 archivaConfig.save( config );
191 archivaConfigControl.setVoidCallable();
193 dbConsumersUtilControl.replay();
194 cleanupConsumersControl.replay();
195 unprocessedConsumersControl.replay();
196 archivaConfigControl.replay();
197 configControl.replay();
201 boolean success = service.configureDatabaseConsumer( "process-pom", true );
202 assertTrue( success );
204 catch ( Exception e )
206 fail( "An exception should not have been thrown." );
209 dbConsumersUtilControl.verify();
210 cleanupConsumersControl.verify();
211 unprocessedConsumersControl.verify();
212 archivaConfigControl.verify();
213 configControl.verify();
215 // test disable "process-pom" db consumer
216 dbConsumersUtilControl.reset();
217 cleanupConsumersControl.reset();
218 unprocessedConsumersControl.reset();
219 archivaConfigControl.reset();
220 configControl.reset();
222 dbScanning.addUnprocessedConsumer( "process-pom" );
226 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
227 configControl.expectAndReturn( config.getDatabaseScanning(), dbScanning );
229 config.setDatabaseScanning( dbScanning );
230 configControl.setMatcher( MockControl.ALWAYS_MATCHER );
231 configControl.setVoidCallable();
233 archivaConfig.save( config );
234 archivaConfigControl.setVoidCallable();
236 dbConsumersUtilControl.replay();
237 cleanupConsumersControl.replay();
238 unprocessedConsumersControl.replay();
239 archivaConfigControl.replay();
240 configControl.replay();
244 boolean success = service.configureDatabaseConsumer( "process-pom", false );
245 assertTrue( success );
247 catch ( Exception e )
249 fail( "An exception should not have been thrown." );
252 dbConsumersUtilControl.verify();
253 cleanupConsumersControl.verify();
254 unprocessedConsumersControl.verify();
255 archivaConfigControl.verify();
256 configControl.verify();
259 public void testConfigureInvalidDatabaseConsumer()
264 dbConsumersUtilControl.replay();
265 cleanupConsumersControl.replay();
266 unprocessedConsumersControl.replay();
270 service.configureDatabaseConsumer( "invalid-consumer", true );
271 fail( "An exception should have been thrown." );
273 catch ( Exception e )
275 assertEquals( "Invalid database consumer.", e.getMessage() );
278 dbConsumersUtilControl.verify();
279 cleanupConsumersControl.verify();
280 unprocessedConsumersControl.verify();
283 /* Tests for repository consumers */
285 public void testGetAllRepoConsumers()
288 recordRepoConsumers();
290 repoConsumerUtilsControl.replay();
291 knownContentConsumerControl.replay();
292 invalidContentConsumerControl.replay();
294 List<String> repoConsumers = service.getAllRepositoryConsumers();
296 repoConsumerUtilsControl.verify();
297 knownContentConsumerControl.verify();
298 invalidContentConsumerControl.verify();
300 assertNotNull( repoConsumers );
301 assertEquals( 4, repoConsumers.size() );
302 assertTrue( repoConsumers.contains( "index-artifact" ) );
303 assertTrue( repoConsumers.contains( "index-pom" ) );
304 assertTrue( repoConsumers.contains( "check-pom" ) );
305 assertTrue( repoConsumers.contains( "check-metadata" ) );
308 public void testConfigureValidRepositoryConsumer()
311 RepositoryScanningConfiguration repoScanning = new RepositoryScanningConfiguration();
312 repoScanning.addKnownContentConsumer( "index-artifact" );
313 repoScanning.addKnownContentConsumer( "index-pom" );
314 repoScanning.addInvalidContentConsumer( "check-pom" );
316 // test enable "check-metadata" consumer
317 recordRepoConsumers();
319 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
320 configControl.expectAndReturn( config.getRepositoryScanning(), repoScanning );
322 config.setRepositoryScanning( repoScanning );
323 configControl.setMatcher( MockControl.ALWAYS_MATCHER );
324 configControl.setVoidCallable();
326 archivaConfig.save( config );
327 archivaConfigControl.setVoidCallable();
329 repoConsumerUtilsControl.replay();
330 knownContentConsumerControl.replay();
331 invalidContentConsumerControl.replay();
332 archivaConfigControl.replay();
333 configControl.replay();
337 boolean success = service.configureRepositoryConsumer( null, "check-metadata", true );
338 assertTrue( success );
340 catch ( Exception e )
342 fail( "An exception should not have been thrown." );
345 repoConsumerUtilsControl.verify();
346 knownContentConsumerControl.verify();
347 invalidContentConsumerControl.verify();
348 archivaConfigControl.verify();
349 configControl.verify();
351 // test disable "check-metadata" consumer
352 repoConsumerUtilsControl.reset();
353 knownContentConsumerControl.reset();
354 invalidContentConsumerControl.reset();
355 archivaConfigControl.reset();
356 configControl.reset();
358 repoScanning.addInvalidContentConsumer( "check-metadata" );
360 recordRepoConsumers();
362 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
363 configControl.expectAndReturn( config.getRepositoryScanning(), repoScanning );
365 config.setRepositoryScanning( repoScanning );
366 configControl.setMatcher( MockControl.ALWAYS_MATCHER );
367 configControl.setVoidCallable();
369 archivaConfig.save( config );
370 archivaConfigControl.setVoidCallable();
372 repoConsumerUtilsControl.replay();
373 knownContentConsumerControl.replay();
374 invalidContentConsumerControl.replay();
375 archivaConfigControl.replay();
376 configControl.replay();
380 boolean success = service.configureRepositoryConsumer( null, "check-metadata", false );
382 repoConsumerUtilsControl.verify();
383 knownContentConsumerControl.verify();
384 invalidContentConsumerControl.verify();
385 archivaConfigControl.verify();
386 configControl.verify();
388 assertTrue( success );
390 catch ( Exception e )
392 fail( "An excecption should not have been thrown." );
397 public void testConfigureInvalidRepositoryConsumer()
400 recordRepoConsumers();
402 repoConsumerUtilsControl.replay();
403 knownContentConsumerControl.replay();
404 invalidContentConsumerControl.replay();
408 service.configureRepositoryConsumer( null, "invalid-consumer", true );
409 fail( "An exception should have been thrown." );
411 catch ( Exception e )
413 assertEquals( "Invalid repository consumer.", e.getMessage() );
416 repoConsumerUtilsControl.verify();
417 knownContentConsumerControl.verify();
418 invalidContentConsumerControl.verify();
421 /* Tests for delete artifact */
423 /* public void testDeleteArtifactArtifactExists()
426 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
427 configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ),
428 createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
431 // - mock checking of artifact existence in the repo
432 // - mock artifact delete
434 archivaConfigControl.replay();
435 configControl.replay();
439 boolean success = service.deleteArtifact( "internal", "org.apache.archiva", "archiva-test", "1.0" );
440 assertTrue( success );
442 catch ( Exception e )
444 fail( "An exception should not have been thrown." );
447 archivaConfigControl.verify();
448 configControl.verify();
451 public void testDeleteArtifactArtifactDoesNotExist()
454 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
455 configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ),
456 createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
458 // TODO mock checking of artifact existence in the repo
460 archivaConfigControl.replay();
461 configControl.replay();
465 service.deleteArtifact( "internal", "org.apache.archiva", "archiva-test", "1.0" );
466 fail( "An exception should have been thrown." );
468 catch ( Exception e )
470 assertEquals( "Artifact does not exist.", e.getMessage() );
473 archivaConfigControl.verify();
474 configControl.verify();
477 public void testDeleteArtifacRepositoryDoesNotExist()
480 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
481 configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ), null );
483 archivaConfigControl.replay();
484 configControl.replay();
488 service.deleteArtifact( "internal", "org.apache.archiva", "archiva-test", "1.0" );
489 fail( "An exception should have been thrown." );
491 catch ( Exception e )
493 assertEquals( "Repository does not exist.", e.getMessage() );
496 archivaConfigControl.verify();
497 configControl.verify();
502 public void testExecuteRepoScannerRepoExists()
505 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
506 configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ),
507 createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
509 RepositoryTask task = new RepositoryTask();
511 taskSchedulerControl.expectAndReturn( taskScheduler.isProcessingAnyRepositoryTask(), false );
512 taskSchedulerControl.expectAndReturn( taskScheduler.isProcessingRepositoryTask( "internal" ), false );
514 taskScheduler.queueRepositoryTask( task );
515 taskSchedulerControl.setMatcher( MockControl.ALWAYS_MATCHER );
516 taskSchedulerControl.setVoidCallable();
518 archivaConfigControl.replay();
519 configControl.replay();
520 taskSchedulerControl.replay();
524 boolean success = service.executeRepositoryScanner( "internal" );
525 assertTrue( success );
527 catch ( Exception e )
529 fail( "An exception should not have been thrown." );
532 archivaConfigControl.verify();
533 configControl.verify();
534 taskSchedulerControl.verify();
537 public void testExecuteRepoScannerRepoDoesNotExist()
540 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
541 configControl.expectAndReturn( config.findManagedRepositoryById( "internal" ), null );
543 archivaConfigControl.replay();
544 configControl.replay();
548 service.executeRepositoryScanner( "internal" );
549 fail( "An exception should have been thrown." );
551 catch ( Exception e )
553 assertEquals( "Repository does not exist.", e.getMessage() );
556 archivaConfigControl.verify();
557 configControl.verify();
562 public void testExecuteDbScanner()
565 DatabaseTask task = new DatabaseTask();
567 taskSchedulerControl.expectAndReturn( taskScheduler.isProcessingDatabaseTask(), false );
569 taskScheduler.queueDatabaseTask( task );
570 taskSchedulerControl.setMatcher( MockControl.ALWAYS_MATCHER );
571 taskSchedulerControl.setVoidCallable();
573 taskSchedulerControl.replay();
575 boolean success = service.executeDatabaseScanner();
577 taskSchedulerControl.verify();
579 assertTrue( success );
584 public void testGetAllManagedRepositories()
587 List<ManagedRepositoryConfiguration> managedRepos = new ArrayList<ManagedRepositoryConfiguration>();
588 managedRepos.add( createManagedRepo( "internal", "default", "Internal Repository", true, false ) );
589 managedRepos.add( createManagedRepo( "snapshots", "default", "Snapshots Repository", false, true ) );
591 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
592 configControl.expectAndReturn( config.getManagedRepositories(), managedRepos );
594 archivaConfigControl.replay();
595 configControl.replay();
597 List<ManagedRepository> repos = service.getAllManagedRepositories();
599 archivaConfigControl.verify();
600 configControl.verify();
602 assertNotNull( repos );
603 assertEquals( 2, repos.size() );
605 assertManagedRepo( ( ManagedRepository ) repos.get( 0 ), managedRepos.get( 0 ) );
606 assertManagedRepo( ( ManagedRepository ) repos.get( 1 ), managedRepos.get( 1 ) );
609 public void testGetAllRemoteRepositories()
612 List<RemoteRepositoryConfiguration> remoteRepos = new ArrayList<RemoteRepositoryConfiguration>();
613 remoteRepos.add( createRemoteRepository( "central", "Central Repository", "default", "http://repo1.maven.org/maven2") );
614 remoteRepos.add( createRemoteRepository( "dummy", "Dummy Remote Repository", "legacy", "http://dummy.com/dummy") );
616 archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config );
617 configControl.expectAndReturn( config.getRemoteRepositories(), remoteRepos );
619 archivaConfigControl.replay();
620 configControl.replay();
622 List<RemoteRepository> repos = service.getAllRemoteRepositories();
624 archivaConfigControl.verify();
625 configControl.verify();
627 assertNotNull( repos );
628 assertEquals( 2, repos.size() );
630 assertRemoteRepo( (RemoteRepository) repos.get( 0 ), remoteRepos.get( 0 ) );
631 assertRemoteRepo( (RemoteRepository) repos.get( 1 ), remoteRepos.get( 1 ) );
634 private void assertRemoteRepo( RemoteRepository remoteRepo, RemoteRepositoryConfiguration expectedRepoConfig )
636 assertEquals( expectedRepoConfig.getId(), remoteRepo.getId() );
637 assertEquals( expectedRepoConfig.getLayout(), remoteRepo.getLayout() );
638 assertEquals( expectedRepoConfig.getName(), remoteRepo.getName() );
639 assertEquals( expectedRepoConfig.getUrl(), remoteRepo.getUrl() );
642 private RemoteRepositoryConfiguration createRemoteRepository(String id, String name, String layout, String url)
644 RemoteRepositoryConfiguration remoteConfig = new RemoteRepositoryConfiguration();
645 remoteConfig.setId( id );
646 remoteConfig.setName( name );
647 remoteConfig.setLayout( layout );
648 remoteConfig.setUrl( url );
653 private void assertManagedRepo( ManagedRepository managedRepo, ManagedRepositoryConfiguration expectedRepoConfig )
655 assertEquals( expectedRepoConfig.getId(), managedRepo.getId() );
656 assertEquals( expectedRepoConfig.getLayout(), managedRepo.getLayout() );
657 assertEquals( expectedRepoConfig.getName(), managedRepo.getName() );
658 assertEquals( "http://localhost:8080/archiva/repository/" + expectedRepoConfig.getId(), managedRepo.getUrl() );
659 assertEquals( expectedRepoConfig.isReleases(), managedRepo.isReleases() );
660 assertEquals( expectedRepoConfig.isSnapshots(), managedRepo.isSnapshots() );
663 private ManagedRepositoryConfiguration createManagedRepo( String id, String layout, String name,
664 boolean hasReleases, boolean hasSnapshots )
666 ManagedRepositoryConfiguration repoConfig = new ManagedRepositoryConfiguration();
667 repoConfig.setId( id );
668 repoConfig.setLayout( layout );
669 repoConfig.setName( name );
670 repoConfig.setReleases( hasReleases );
671 repoConfig.setSnapshots( hasSnapshots );
676 private void recordRepoConsumers()
678 List<KnownRepositoryContentConsumer> availableKnownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
679 availableKnownConsumers.add( indexArtifactConsumer );
680 availableKnownConsumers.add( indexPomConsumer );
682 List<InvalidRepositoryContentConsumer> availableInvalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
683 availableInvalidConsumers.add( checkPomConsumer );
684 availableInvalidConsumers.add( checkMetadataConsumer );
686 repoConsumerUtilsControl.expectAndReturn( repoConsumersUtil.getAvailableKnownConsumers(), availableKnownConsumers );
687 knownContentConsumerControl.expectAndReturn( indexArtifactConsumer.getId(), "index-artifact" );
688 knownContentConsumerControl.expectAndReturn( indexPomConsumer.getId(), "index-pom" );
690 repoConsumerUtilsControl.expectAndReturn( repoConsumersUtil.getAvailableInvalidConsumers(), availableInvalidConsumers );
691 invalidContentConsumerControl.expectAndReturn( checkPomConsumer.getId(), "check-pom" );
692 invalidContentConsumerControl.expectAndReturn( checkMetadataConsumer.getId(), "check-metadata" );
695 private void recordDbConsumers()
697 List<DatabaseCleanupConsumer> cleanupConsumers = new ArrayList<DatabaseCleanupConsumer>();
698 cleanupConsumers.add( cleanupIndexConsumer );
699 cleanupConsumers.add( cleanupDbConsumer );
701 List<DatabaseUnprocessedArtifactConsumer> unprocessedConsumers =
702 new ArrayList<DatabaseUnprocessedArtifactConsumer>();
703 unprocessedConsumers.add( processArtifactConsumer );
704 unprocessedConsumers.add( processPomConsumer );
706 dbConsumersUtilControl.expectAndReturn( dbConsumersUtil.getAvailableCleanupConsumers(), cleanupConsumers );
707 cleanupConsumersControl.expectAndReturn( cleanupIndexConsumer.getId(), "cleanup-index" );
708 cleanupConsumersControl.expectAndReturn( cleanupDbConsumer.getId(), "cleanup-database" );
710 dbConsumersUtilControl.expectAndReturn( dbConsumersUtil.getAvailableUnprocessedConsumers(), unprocessedConsumers );
711 unprocessedConsumersControl.expectAndReturn( processArtifactConsumer.getId(), "process-artifact" );
712 unprocessedConsumersControl.expectAndReturn( processPomConsumer.getId(), "process-pom" );