diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java index b08e8ca339..0ad0f7af5e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurerTests.java @@ -38,7 +38,7 @@ import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link MeterRegistryConfigurer}. @@ -128,7 +128,7 @@ class MeterRegistryConfigurerTests { MeterRegistryConfigurer configurer = new MeterRegistryConfigurer(createObjectProvider(this.customizers), createObjectProvider(this.filters), createObjectProvider(this.binders), false, true); configurer.configure(this.mockRegistry); - verifyZeroInteractions(this.mockBinder); + verifyNoInteractions(this.mockBinder); } @Test diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthWebEndpointResponseMapperTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthWebEndpointResponseMapperTests.java index 9531bce24e..66cd6ab428 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthWebEndpointResponseMapperTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthWebEndpointResponseMapperTests.java @@ -35,7 +35,7 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link HealthWebEndpointResponseMapper}. @@ -56,8 +56,8 @@ class HealthWebEndpointResponseMapperTests { SecurityContext securityContext = mock(SecurityContext.class); WebEndpointResponse response = mapper.mapDetails(supplier, securityContext); assertThat(response.getStatus()).isEqualTo(HttpStatus.NOT_FOUND.value()); - verifyZeroInteractions(supplier); - verifyZeroInteractions(securityContext); + verifyNoInteractions(supplier); + verifyNoInteractions(securityContext); } @Test @@ -68,7 +68,7 @@ class HealthWebEndpointResponseMapperTests { WebEndpointResponse response = mapper.mapDetails(supplier, securityContext); assertThat(response.getStatus()).isEqualTo(HttpStatus.NOT_FOUND.value()); assertThat(response.getBody()).isNull(); - verifyZeroInteractions(supplier); + verifyNoInteractions(supplier); verify(securityContext).isUserInRole("ACTUATOR"); } @@ -94,7 +94,7 @@ class HealthWebEndpointResponseMapperTests { assertThat(response.getStatus()).isEqualTo(HttpStatus.NOT_FOUND.value()); assertThat(response.getBody()).isNull(); verify(supplier).get(); - verifyZeroInteractions(securityContext); + verifyNoInteractions(securityContext); } @SuppressWarnings("unchecked") diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java index dadc3d1500..0bf55d46f2 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/logging/LoggersEndpointWebIntegrationTests.java @@ -45,7 +45,7 @@ import org.springframework.test.web.reactive.server.WebTestClient; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Integration tests for {@link LoggersEndpoint} when exposed via Jersey, Spring MVC, and @@ -165,7 +165,7 @@ class LoggersEndpointWebIntegrationTests { this.client.post().uri("/actuator/loggers/ROOT").contentType(MediaType.APPLICATION_JSON) .bodyValue(Collections.singletonMap("configuredLevel", "other")).exchange().expectStatus() .isBadRequest(); - verifyZeroInteractions(this.loggingSystem); + verifyNoInteractions(this.loggingSystem); } @WebEndpointTest diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java index 17456fedd2..740168a1ca 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/prometheus/PrometheusPushGatewayManagerTests.java @@ -44,7 +44,7 @@ import static org.mockito.BDDMockito.willThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link PrometheusPushGatewayManager}. @@ -162,7 +162,7 @@ class PrometheusPushGatewayManagerTests { this.scheduler, this.pushRate, "job", this.groupingKey, ShutdownOperation.NONE); manager.shutdown(); verify(this.future).cancel(false); - verifyZeroInteractions(this.pushGateway); + verifyNoInteractions(this.pushGateway); } @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java index 5f84b03fd0..2a82907cd3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java @@ -40,7 +40,7 @@ import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; import org.springframework.util.ClassUtils; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link ImportAutoConfigurationImportSelector}. @@ -83,7 +83,7 @@ class ImportAutoConfigurationImportSelectorTests { void propertyExclusionsAreNotApplied() throws Exception { AnnotationMetadata annotationMetadata = getAnnotationMetadata(ImportFreeMarker.class); this.importSelector.selectImports(annotationMetadata); - verifyZeroInteractions(this.environment); + verifyNoInteractions(this.environment); } @Test diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java index 2e6424a48f..cb677e5ba6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java @@ -67,7 +67,7 @@ import org.springframework.util.Assert; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link QuartzAutoConfiguration}. @@ -157,7 +157,7 @@ class QuartzAutoConfigurationTests { Scheduler scheduler = context.getBean(Scheduler.class); assertThat(scheduler.getMetaData().getThreadPoolSize()).isEqualTo(50); Executor executor = context.getBean(Executor.class); - verifyZeroInteractions(executor); + verifyNoInteractions(executor); }); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java index 112a58715c..c4a13c47b2 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherFilterTests.java @@ -42,7 +42,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.willReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link DispatcherFilter}. @@ -82,7 +82,7 @@ class DispatcherFilterTests { ServletRequest request = mock(ServletRequest.class); ServletResponse response = mock(ServletResponse.class); this.filter.doFilter(request, response, this.chain); - verifyZeroInteractions(this.dispatcher); + verifyNoInteractions(this.dispatcher); verify(this.chain).doFilter(request, response); } @@ -100,7 +100,7 @@ class DispatcherFilterTests { HttpServletResponse response = new MockHttpServletResponse(); willReturn(true).given(this.dispatcher).handle(any(ServerHttpRequest.class), any(ServerHttpResponse.class)); this.filter.doFilter(request, response, this.chain); - verifyZeroInteractions(this.chain); + verifyNoInteractions(this.chain); verify(this.dispatcher).handle(this.serverRequestCaptor.capture(), this.serverResponseCaptor.capture()); ServerHttpRequest dispatcherRequest = this.serverRequestCaptor.getValue(); ServletServerHttpRequest actualRequest = (ServletServerHttpRequest) dispatcherRequest; diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java index 3a4ed8db05..28fb45d722 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/remote/server/DispatcherTests.java @@ -41,7 +41,7 @@ import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.withSettings; /** @@ -91,7 +91,7 @@ class DispatcherTests { given(mapper.getHandler(any(ServerHttpRequest.class))).willReturn(handler); Dispatcher dispatcher = new Dispatcher(this.accessManager, Collections.singleton(mapper)); dispatcher.handle(this.serverRequest, this.serverResponse); - verifyZeroInteractions(handler); + verifyNoInteractions(handler); assertThat(this.response.getStatus()).isEqualTo(403); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java index 43cfae67d4..c34d0f0579 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/RestarterTests.java @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link Restarter}. @@ -136,7 +136,7 @@ class RestarterTests { ObjectFactory objectFactory = mock(ObjectFactory.class); Object attribute = Restarter.getInstance().getOrAddAttribute("x", objectFactory); assertThat(attribute).isEqualTo("abc"); - verifyZeroInteractions(objectFactory); + verifyNoInteractions(objectFactory); } @Test diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java index ef9eb19449..619a6ed6ad 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/server/HttpRestartServerTests.java @@ -38,7 +38,7 @@ import org.springframework.mock.web.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link HttpRestartServer}. @@ -92,7 +92,7 @@ class HttpRestartServerTests { MockHttpServletRequest request = new MockHttpServletRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); this.server.handle(new ServletServerHttpRequest(request), new ServletServerHttpResponse(response)); - verifyZeroInteractions(this.delegate); + verifyNoInteractions(this.delegate); assertThat(response.getStatus()).isEqualTo(500); } @@ -103,7 +103,7 @@ class HttpRestartServerTests { MockHttpServletResponse response = new MockHttpServletResponse(); request.setContent(new byte[] { 0, 0, 0 }); this.server.handle(new ServletServerHttpRequest(request), new ServletServerHttpResponse(response)); - verifyZeroInteractions(this.delegate); + verifyNoInteractions(this.delegate); assertThat(response.getStatus()).isEqualTo(500); } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingContextCustomizerFactoryTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingContextCustomizerFactoryTests.java index ed6d1415b4..a2d5197ae0 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingContextCustomizerFactoryTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingContextCustomizerFactoryTests.java @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link PropertyMappingContextCustomizerFactory}. @@ -53,7 +53,7 @@ class PropertyMappingContextCustomizerFactoryTests { given(context.getEnvironment()).willReturn(environment); given(context.getBeanFactory()).willReturn(beanFactory); customizer.customizeContext(context, null); - verifyZeroInteractions(environment); + verifyNoInteractions(environment); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringBootExceptionHandlerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringBootExceptionHandlerTests.java index 07823ca7b8..bd7a202a32 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringBootExceptionHandlerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringBootExceptionHandlerTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link SpringBootExceptionHandler}. @@ -43,7 +43,7 @@ class SpringBootExceptionHandlerTests { Exception ex = new Exception(); this.handler.registerLoggedException(ex); this.handler.uncaughtException(thread, ex); - verifyZeroInteractions(this.parent); + verifyNoInteractions(this.parent); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java index f229485a59..4a128f6a87 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindResultTests.java @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThatIOException; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link BindResult}. @@ -100,7 +100,7 @@ class BindResultTests { void ifBoundWhenHasNoValueShouldNotCallConsumer() { BindResult result = BindResult.of(null); result.ifBound(this.consumer); - verifyZeroInteractions(this.consumer); + verifyNoInteractions(this.consumer); } @Test @@ -121,7 +121,7 @@ class BindResultTests { void mapWhenHasNoValueShouldNotCallMapper() { BindResult result = BindResult.of(null); result.map(this.mapper); - verifyZeroInteractions(this.mapper); + verifyNoInteractions(this.mapper); } @Test @@ -140,7 +140,7 @@ class BindResultTests { void orElseGetWhenHasValueShouldReturnValue() { BindResult result = BindResult.of("foo"); assertThat(result.orElseGet(this.supplier)).isEqualTo("foo"); - verifyZeroInteractions(this.supplier); + verifyNoInteractions(this.supplier); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/DeferredLogTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/DeferredLogTests.java index 079617ab78..9824b61632 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/DeferredLogTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/DeferredLogTests.java @@ -26,8 +26,8 @@ import org.springframework.test.util.ReflectionTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.verifyZeroInteractions; /** * Tests for {@link DeferredLog}. @@ -168,7 +168,7 @@ class DeferredLogTests { verify(this.log).info("1", null); verify(this.log).fatal("2", null); verifyNoMoreInteractions(this.log); - verifyZeroInteractions(log2); + verifyNoInteractions(log2); } @SuppressWarnings("unchecked") diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java index 4b19060c3f..3d7838feea 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link TaskExecutorBuilder}. @@ -125,7 +125,7 @@ class TaskExecutorBuilderTests { TaskExecutorCustomizer customizer2 = mock(TaskExecutorCustomizer.class); ThreadPoolTaskExecutor executor = this.builder.customizers(customizer1) .customizers(Collections.singleton(customizer2)).build(); - verifyZeroInteractions(customizer1); + verifyNoInteractions(customizer1); verify(customizer2).customize(executor); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java index 03827f6274..e1363bc5cd 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java @@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link TaskSchedulerBuilder}. @@ -101,7 +101,7 @@ class TaskSchedulerBuilderTests { TaskSchedulerCustomizer customizer2 = mock(TaskSchedulerCustomizer.class); ThreadPoolTaskScheduler scheduler = this.builder.customizers(customizer1) .customizers(Collections.singleton(customizer2)).build(); - verifyZeroInteractions(customizer1); + verifyNoInteractions(customizer1); verify(customizer2).customize(scheduler); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java index 797170acb6..96c1c04042 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/util/LambdaSafeTests.java @@ -35,7 +35,7 @@ import static org.mockito.ArgumentMatchers.contains; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link LambdaSafe}. @@ -88,7 +88,7 @@ class LambdaSafeTests { GenericCallback callbackInstance = mock(StringBuilderCallback.class); String argument = "foo"; LambdaSafe.callback(GenericCallback.class, callbackInstance, argument).invoke((c) -> c.handle(argument)); - verifyZeroInteractions(callbackInstance); + verifyNoInteractions(callbackInstance); } @Test @@ -164,7 +164,7 @@ class LambdaSafeTests { InvocationResult result = LambdaSafe.callback(GenericFactory.class, callbackInstance, argument) .invokeAnd((c) -> c.handle(argument)); assertThat(result.hasResult()).isFalse(); - verifyZeroInteractions(callbackInstance); + verifyNoInteractions(callbackInstance); } @Test @@ -229,7 +229,7 @@ class LambdaSafeTests { String argument = "foo"; LambdaSafe.callbacks(GenericCallback.class, Collections.singleton(callbackInstance), argument) .invoke((c) -> c.handle(null)); - verifyZeroInteractions(callbackInstance); + verifyNoInteractions(callbackInstance); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java index 48dce0245b..57eb724cae 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/RestTemplateBuilderTests.java @@ -62,7 +62,7 @@ import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess; @@ -391,7 +391,7 @@ class RestTemplateBuilderTests { RestTemplateCustomizer customizer2 = mock(RestTemplateCustomizer.class); RestTemplate template = this.builder.customizers(customizer1).customizers(Collections.singleton(customizer2)) .build(); - verifyZeroInteractions(customizer1); + verifyNoInteractions(customizer1); verify(customizer2).customize(template); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java index ec60cb6ea8..31d18d94ed 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/webservices/client/WebServiceTemplateBuilderTests.java @@ -47,7 +47,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; /** * Tests for {@link WebServiceTemplateBuilder}. @@ -241,7 +241,7 @@ class WebServiceTemplateBuilderTests { WebServiceTemplateCustomizer customizer2 = mock(WebServiceTemplateCustomizer.class); WebServiceTemplate template = this.builder.customizers(customizer1) .customizers(Collections.singleton(customizer2)).build(); - verifyZeroInteractions(customizer1); + verifyNoInteractions(customizer1); verify(customizer2).customize(template); }