### Question:
AnyQualifier implements Qualifier<T> { @Override public Stream<ComponentDescriptor<T>> filter(final Class<T> componentType, final Stream<ComponentDescriptor<T>> candidates) { final List<ComponentDescriptor<T>> listCandidates = candidates.collect(Collectors.toList()); return qualifiers.stream() .flatMap(qualifier -> qualifier.filter(componentType, listCandidates.stream())); } AnyQualifier(final List<Qualifier<T>> qualifiers); @Override Stream<ComponentDescriptor<T>> filter(final Class<T> componentType,
                                                 final Stream<ComponentDescriptor<T>> candidates); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void shouldReturnAnyComponentMatchingOneRestriction() { final var descriptorA = new SimpleComponentDescriptor<>( "A", Object.class, Object::new, true); final var descriptorB = new SimpleComponentDescriptor<>( "B", Object.class, Object::new, true); final var descriptorC = new SimpleComponentDescriptor<>( "C", Object.class, Object::new, true); final var qualifier = new AnyQualifier<>( Arrays.asList(Qualifiers.byName("A"), Qualifiers.byName("C")) ); List<String> filtered = qualifier .filter(Object.class, Stream.of(descriptorA, descriptorB, descriptorC)) .map(ComponentDescriptor::name) .collect(Collectors.toList()); Assertions.assertEquals(2, filtered.size()); Assertions.assertTrue(filtered.containsAll(Arrays.asList("A", "C"))); }