diff --git a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java index 595f510717..9fb1e2b72e 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java @@ -147,6 +147,13 @@ public class MergedAnnotationsTests { assertThat(annotations.isPresent(ComposedTransactionalComponent.class)).isTrue(); } + @Test + public void getParent() { + MergedAnnotations annotations = MergedAnnotations.from(ComposedTransactionalComponentClass.class); + assertThat(annotations.get(TransactionalComponent.class).getParent().getType()) + .isEqualTo(ComposedTransactionalComponent.class); + } + @Test public void collectMultiValueMapFromNonAnnotatedClass() { MultiValueMap map = MergedAnnotations.from(