### Question:
RepositoryContentConsumers implements ApplicationContextAware { public List<String> getSelectedInvalidConsumerIds() throws ConsumerException { try { return archivaAdministration.getInvalidContentConsumers(); } catch ( RepositoryAdminException e ) { throw new ConsumerException( e.getMessage( ), e ); } } @Inject  RepositoryContentConsumers( ArchivaAdministration archivaAdministration ); @Override void setApplicationContext( ApplicationContext applicationContext ); List<String> getSelectedKnownConsumerIds(); List<String> getSelectedInvalidConsumerIds(); Map<String, KnownRepositoryContentConsumer> getSelectedKnownConsumersMap(); Map<String, InvalidRepositoryContentConsumer> getSelectedInvalidConsumersMap(); List<KnownRepositoryContentConsumer> getSelectedKnownConsumers(); void releaseSelectedKnownConsumers( List<KnownRepositoryContentConsumer> repositoryContentConsumers ); synchronized List<InvalidRepositoryContentConsumer> getSelectedInvalidConsumers(); List<KnownRepositoryContentConsumer> getAvailableKnownConsumers(); List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers(); void executeConsumers( ManagedRepository repository, Path localFile, boolean updateRelatedArtifacts ); void setSelectedKnownConsumers( List<KnownRepositoryContentConsumer> selectedKnownConsumers ); void setSelectedInvalidConsumers( List<InvalidRepositoryContentConsumer> selectedInvalidConsumers ); void setArchivaAdministration( ArchivaAdministration archivaAdministration );  }### Answer:
@Test public void testGetSelectedInvalidIds() throws Exception { RepositoryContentConsumers consumerutil = lookupRepositoryConsumers(); String expectedInvalidIds[] = new String[]{ "update-db-bad-content" }; List<String> invalidConsumers = consumerutil.getSelectedInvalidConsumerIds(); assertNotNull( "Invalid Consumer IDs should not be null", invalidConsumers ); assertEquals( "Invalid Consumer IDs.size", expectedInvalidIds.length, invalidConsumers.size() ); for ( String expectedId : expectedInvalidIds ) { assertTrue( "Invalid id [" + expectedId + "] exists.", invalidConsumers.contains( expectedId ) ); } }