### Question:
RepositoryContentConsumers implements ApplicationContextAware { public Map<String, InvalidRepositoryContentConsumer> getSelectedInvalidConsumersMap() throws ConsumerException { Map<String, InvalidRepositoryContentConsumer> consumerMap = new HashMap<>(); for ( InvalidRepositoryContentConsumer consumer : getSelectedInvalidConsumers() ) { consumerMap.put( consumer.getId(), consumer ); } return consumerMap; } @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 testGetSelectedInvalidConsumerMap() throws Exception { RepositoryContentConsumers consumerutil = lookupRepositoryConsumers(); String expectedSelectedInvalidIds[] = new String[]{ "update-db-bad-content" }; Map<String, InvalidRepositoryContentConsumer> invalidConsumerMap = consumerutil.getSelectedInvalidConsumersMap(); assertNotNull( "Invalid Consumer Map should not be null", invalidConsumerMap ); assertEquals( "Invalid Consumer Map.size", expectedSelectedInvalidIds.length, invalidConsumerMap.size() ); for ( String expectedId : expectedSelectedInvalidIds ) { InvalidRepositoryContentConsumer consumer = invalidConsumerMap.get( expectedId ); assertNotNull( "Known[" + expectedId + "] should not be null.", consumer ); assertEquals( "Known[" + expectedId + "].id", expectedId, consumer.getId() ); } }