### Question:
RepositoryContentConsumers implements ApplicationContextAware { public List<InvalidRepositoryContentConsumer> getAvailableInvalidConsumers() { return new ArrayList<>( applicationContext.getBeansOfType( InvalidRepositoryContentConsumer.class ).values() ); } @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 testGetAvailableInvalidList() throws Exception { RepositoryContentConsumers consumerutil = lookupRepositoryConsumers(); String expectedInvalidIds[] = new String[]{ "update-db-bad-content", "move-to-trash-then-notify" }; List<InvalidRepositoryContentConsumer> invalidConsumers = consumerutil.getAvailableInvalidConsumers(); assertNotNull( "invalid consumers should not be null.", invalidConsumers ); assertEquals( "invalid consumers", expectedInvalidIds.length, invalidConsumers.size() ); List<String> expectedIds = Arrays.asList( expectedInvalidIds ); for ( InvalidRepositoryContentConsumer consumer : invalidConsumers ) { assertTrue( "Consumer [" + consumer.getId() + "] returned by .getAvailableInvalidConsumers() is unexpected.", expectedIds.contains( consumer.getId() ) ); } }