### Question:
RepositoryContentConsumers implements ApplicationContextAware { public List<String> getSelectedKnownConsumerIds() throws ConsumerException { try { return archivaAdministration.getKnownContentConsumers(); } 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 testGetSelectedKnownIds() throws Exception { RepositoryContentConsumers consumerutil = lookupRepositoryConsumers(); String expectedKnownIds[] = new String[]{ "create-missing-checksums", "validate-checksum", "validate-signature", "index-content", "auto-remove", "auto-rename", "create-archiva-metadata", "duplicate-artifacts" }; List<String> knownConsumers = consumerutil.getSelectedKnownConsumerIds(); assertNotNull( "Known Consumer IDs should not be null", knownConsumers ); assertEquals( "Known Consumer IDs.size " + knownConsumers, expectedKnownIds.length, knownConsumers.size() ); for ( String expectedId : expectedKnownIds ) { assertTrue( "Known id [" + expectedId + "] exists.", knownConsumers.contains( expectedId ) ); } }