From 49217c6aee37d84eec7bd2ddcd8ee0562649136e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 24 Jan 2024 16:16:43 +0100 Subject: [PATCH] Polishing. Javadoc, static imports. See #3033 Original pull request: #3034 --- .../data/web/aot/WebRuntimeHintsUnitTests.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/springframework/data/web/aot/WebRuntimeHintsUnitTests.java b/src/test/java/org/springframework/data/web/aot/WebRuntimeHintsUnitTests.java index 4cb0ffc37..72b20118f 100644 --- a/src/test/java/org/springframework/data/web/aot/WebRuntimeHintsUnitTests.java +++ b/src/test/java/org/springframework/data/web/aot/WebRuntimeHintsUnitTests.java @@ -16,9 +16,10 @@ package org.springframework.data.web.aot; import static org.assertj.core.api.Assertions.*; +import static org.mockito.Mockito.*; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; + import org.springframework.aot.hint.ReflectionHints; import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.TypeReference; @@ -26,6 +27,8 @@ import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.data.test.util.ClassPathExclusions; /** + * Unit tests for {@link WebRuntimeHints}. + * * @author Christoph Strobl */ class WebRuntimeHintsUnitTests { @@ -34,8 +37,8 @@ class WebRuntimeHintsUnitTests { void shouldRegisterRuntimeHintWhenJacksonPresent() { ReflectionHints reflectionHints = new ReflectionHints(); - RuntimeHints runtimeHints = Mockito.mock(RuntimeHints.class); - Mockito.when(runtimeHints.reflection()).thenReturn(reflectionHints); + RuntimeHints runtimeHints = mock(RuntimeHints.class); + when(runtimeHints.reflection()).thenReturn(reflectionHints); new WebRuntimeHints().registerHints(runtimeHints, this.getClass().getClassLoader()); @@ -48,8 +51,8 @@ class WebRuntimeHintsUnitTests { void shouldRegisterRuntimeHintWithTypeNameWhenJacksonNotPresent() { ReflectionHints reflectionHints = new ReflectionHints(); - RuntimeHints runtimeHints = Mockito.mock(RuntimeHints.class); - Mockito.when(runtimeHints.reflection()).thenReturn(reflectionHints); + RuntimeHints runtimeHints = mock(RuntimeHints.class); + when(runtimeHints.reflection()).thenReturn(reflectionHints); new WebRuntimeHints().registerHints(runtimeHints, this.getClass().getClassLoader());