From dab90cb7cc2b463cffd0a18751c97ccf80e1ef29 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 21 Apr 2019 16:32:09 +0200 Subject: [PATCH] Test status quo for MergedAnnotation.getParent() See gh-22818 --- .../core/annotation/MergedAnnotationsTests.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 595f510717f..9fb1e2b72e3 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(