### Question:
ClassComponentAliasesGenerator implements ComponentAliasesGenerator { @Override public Set<String> getAliasesFor(final ComponentDescriptor descriptor, final Collection<? extends ComponentDescriptor> allDescriptors) { final Set<String> aliases = computeAllAliasesFor(descriptor, extractors); boolean match = false; for (ComponentDescriptor other : allDescriptors) { final Set<String> otherAliases = computeAllAliasesFor(other, extractors); if (aliases.equals(otherAliases)) { if (match) { return Collections.emptySet(); } match = true; } else { for (final String otherAlias : otherAliases) { if (aliases.contains(otherAlias)) { if (match) { return Collections.emptySet(); } match = true; break; } } } } return aliases; } ClassComponentAliasesGenerator(); void addClassAliasExtractor(final ClassAliasExtractor extractor); @Override Set<String> getAliasesFor(final ComponentDescriptor descriptor,
                                     final Collection<? extends ComponentDescriptor> allDescriptors);  }### Answer:
@Test public void shouldGenerateAliasesForTopologyProvider() { ClassComponentAliasesGenerator generator = new ClassComponentAliasesGenerator(); Set<String> aliases = generator.getAliasesFor(descriptor, Collections.emptyList()); assertTrue(aliases.contains("TestTopologyProvider")); assertTrue(aliases.contains("TestTopology")); assertTrue(aliases.contains("Test")); }