From 018bdb2d64a6159c3befd6cfd149b041e9c3b5a6 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Wed, 13 Sep 2023 17:10:16 +0800 Subject: [PATCH] Correct method parameter type in tests. Before this commit, actual method parameter type doesn't match method signature. Closes #2928 --- ...tPublishingRepositoryProxyPostProcessorUnitTests.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java b/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java index 7fbc72ddc..d302371ca 100644 --- a/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java +++ b/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java @@ -27,6 +27,7 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.List; import java.util.UUID; import org.aopalliance.aop.Advice; @@ -194,7 +195,7 @@ class EventPublishingRepositoryProxyPostProcessorUnitTests { var event = new SomeEvent(); var sample = MultipleEvents.of(Collections.singletonList(event)); - mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), sample); + mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), List.of(sample)); EventPublishingMethodInterceptor// .of(EventPublishingMethod.of(MultipleEvents.class), publisher)// @@ -208,7 +209,7 @@ class EventPublishingRepositoryProxyPostProcessorUnitTests { var event = new SomeEvent(); var sample = MultipleEvents.of(Collections.singletonList(event)); - mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), sample); + mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), List.of(sample)); EventPublishingMethodInterceptor// .of(EventPublishingMethod.of(MultipleEvents.class), publisher)// @@ -222,7 +223,7 @@ class EventPublishingRepositoryProxyPostProcessorUnitTests { var event = new SomeEvent(); var sample = MultipleEvents.of(Collections.singletonList(event)); - mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), sample); + mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), List.of(sample)); EventPublishingMethodInterceptor// .of(EventPublishingMethod.of(MultipleEvents.class), publisher)// @@ -236,7 +237,7 @@ class EventPublishingRepositoryProxyPostProcessorUnitTests { var event = new SomeEvent(); var sample = MultipleEvents.of(Collections.singletonList(event)); - mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), sample); + mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), List.of(sample)); EventPublishingMethodInterceptor// .of(EventPublishingMethod.of(MultipleEvents.class), publisher)//