### Question:
AnnotationResolver { public static List<Annotation> findAllAnnotations(final Class<?> cls) { final var annotations = new ArrayList<Annotation>(); for (final Class<?> t : getAllSuperTypes(cls)) { var declared = Arrays.stream(t.getDeclaredAnnotations()) .filter(Predicate.not(JAVA_PACKAGES::matches)) .filter(Predicate.not(KOTLIN_PACKAGES::matches)) .flatMap(AnnotationResolver::mayUnwrapAnnotationContainer) .collect(Collectors.toList()); annotations.addAll(declared); declared.stream() .flatMap(annotation -> findAllAnnotations(annotation.annotationType()).stream()) .forEach(annotations::add); } return annotations; }  static boolean isAnnotationOfType(final Annotation annotation,
                                             final Class<?> type); static boolean isAnnotationContainer(final Class<? extends Annotation> annotationType); static List<Annotation> findAllAnnotations(final Class<?> cls); static List<T> findAllAnnotationsByType(final Method method,
                                                                          final Class<T> annotationType); static List<T> findAllAnnotationsByType(final Class<?> cls,
                                                                          final Class<T> annotationType); static boolean isAnnotatedWith(final Method method,
                                                                 final Class<A> annotation); static boolean isAnnotatedWith(final Class<?> component,
                                                                 final Class<A> annotation);  }### Answer:
@Test public void shouldResolvedAllAnnotationsByUnwrappingContainerGivenClass() { final List<Annotation> annotations = AnnotationResolver.findAllAnnotations(RepeatableTestClass.class); assertEquals(2, annotations.size()); final List<String> values = annotations .stream().map(annotation -> ((TestAnnotation)annotation).value()) .collect(Collectors.toList()); assertTrue(values.containsAll(Arrays.asList("child1", "child2"))); }