diff --git a/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/annotation/SqsListenerAnnotationBeanPostProcessorTests.java b/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/annotation/SqsListenerAnnotationBeanPostProcessorTests.java index 6919699a6..879f7556b 100644 --- a/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/annotation/SqsListenerAnnotationBeanPostProcessorTests.java +++ b/spring-cloud-aws-sqs/src/test/java/io/awspring/cloud/sqs/annotation/SqsListenerAnnotationBeanPostProcessorTests.java @@ -257,10 +257,8 @@ protected EndpointRegistrar createEndpointRegistrar() { assertThat(endpoint.getLogicalNames()).containsExactly("classLevelQueue"); assertThat(endpoint).isInstanceOfSatisfying(MultiMethodSqsEndpoint.class, multiMethodSqsEndpoint -> { assertThat(multiMethodSqsEndpoint.getMethods()).hasSize(2); - assertThat(multiMethodSqsEndpoint.getMethods().get(0)) - .isEqualTo(ClassLevelListener.class.getDeclaredMethods()[0]); - assertThat(multiMethodSqsEndpoint.getMethods().get(1)) - .isEqualTo(ClassLevelListener.class.getDeclaredMethods()[1]); + assertThat(multiMethodSqsEndpoint.getMethods()).extracting(method -> method.getParameterTypes()[0]) + .containsExactlyInAnyOrder(String.class, Integer.class); }); }