From c4c0aca69b07d2656fadfb91309e23920c93f8fd Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Wed, 8 Apr 2026 10:11:23 +0200 Subject: [PATCH] Polishing --- .../core/type/AbstractMethodMetadataTests.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-core/src/test/java/org/springframework/core/type/AbstractMethodMetadataTests.java b/spring-core/src/test/java/org/springframework/core/type/AbstractMethodMetadataTests.java index 799626afd1b..97547e824b9 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AbstractMethodMetadataTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AbstractMethodMetadataTests.java @@ -187,12 +187,12 @@ public abstract class AbstractMethodMetadataTests { } @Test - void isStatusWhenStaticReturnsTrue() { + void isStaticWhenStaticReturnsTrue() { assertThat(getTagged(WithStaticMethod.class).isStatic()).isTrue(); } @Test - void isStaticWhenNotStaticReturnsFalse() { + void isStaticWhenNonStaticReturnsFalse() { assertThat(getTagged(WithMethod.class).isStatic()).isFalse(); } @@ -248,7 +248,9 @@ public abstract class AbstractMethodMetadataTests { void getAnnotationAttributesReturnsAttributes() { Map attributes = getTagged(WithAnnotationAttributes.class) .getAnnotationAttributes(AnnotationAttributes.class.getName()); - assertThat(attributes).containsOnly(entry("name", "test"), entry("size", 1)); + // We do not use containsExactlyInAnyOrder(), because annotations + // must be returned in source declaration order. + assertThat(attributes).containsExactly(entry("name", "test"), entry("size", 1)); } @Test