@Test void complexCase() { final Set<Label> labels1 = getLabels(Test1.class); assertThat(labels1) .extracting(Label::getName, Label::getValue) .containsExactlyInAnyOrder( tuple("feature", "A"), tuple("story", "s1"), tuple("owner", "tester1") ); final Set<Label> labels2 = getLabels(Test2.class); assertThat(labels2) .extracting(Label::getName, Label::getValue) .containsExactlyInAnyOrder( tuple("feature", "B"), tuple("story", "s2"), tuple("owner", "tester2") ); final Set<Label> labels3 = getLabels(Test3.class); assertThat(labels3) .extracting(Label::getName, Label::getValue) .containsExactlyInAnyOrder( tuple("feature", "A"), tuple("story", "s1"), tuple("owner", "tester1"), tuple("feature", "B"), tuple("story", "s2"), tuple("owner", "tester2") ); }
public static Set<Label> getLabels(final AnnotatedElement annotatedElement) { return getLabels(annotatedElement.getDeclaredAnnotations()); }
AnnotationUtils { public static Set<Label> getLabels(final AnnotatedElement annotatedElement) { return getLabels(annotatedElement.getDeclaredAnnotations()); } }
AnnotationUtils { public static Set<Label> getLabels(final AnnotatedElement annotatedElement) { return getLabels(annotatedElement.getDeclaredAnnotations()); } private  AnnotationUtils(); }
AnnotationUtils { public static Set<Label> getLabels(final AnnotatedElement annotatedElement) { return getLabels(annotatedElement.getDeclaredAnnotations()); } private  AnnotationUtils(); static Set<Link> getLinks(final AnnotatedElement annotatedElement); static Set<Link> getLinks(final Annotation... annotations); static Set<Link> getLinks(final Collection<Annotation> annotations); static Set<Label> getLabels(final AnnotatedElement annotatedElement); static Set<Label> getLabels(final Annotation... annotations); static Set<Label> getLabels(final Collection<Annotation> annotations); }
AnnotationUtils { public static Set<Label> getLabels(final AnnotatedElement annotatedElement) { return getLabels(annotatedElement.getDeclaredAnnotations()); } private  AnnotationUtils(); static Set<Link> getLinks(final AnnotatedElement annotatedElement); static Set<Link> getLinks(final Annotation... annotations); static Set<Link> getLinks(final Collection<Annotation> annotations); static Set<Label> getLabels(final AnnotatedElement annotatedElement); static Set<Label> getLabels(final Annotation... annotations); static Set<Label> getLabels(final Collection<Annotation> annotations);  }