diff --git a/src/test/java/org/springframework/hateoas/config/HypermediaWebFluxConfigurerTest.java b/src/test/java/org/springframework/hateoas/config/HypermediaWebFluxConfigurerTest.java index f523cbfa..5441b8bc 100644 --- a/src/test/java/org/springframework/hateoas/config/HypermediaWebFluxConfigurerTest.java +++ b/src/test/java/org/springframework/hateoas/config/HypermediaWebFluxConfigurerTest.java @@ -15,6 +15,18 @@ */ package org.springframework.hateoas.config; +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; +import static org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType.*; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + import org.junit.jupiter.api.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -38,17 +50,6 @@ import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; -import static org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType.*; /** * @author Greg Turnquist diff --git a/src/test/java/org/springframework/hateoas/config/HypermediaWebTestClientConfigurerTest.java b/src/test/java/org/springframework/hateoas/config/HypermediaWebTestClientConfigurerTest.java index b2d04c45..41b1bb01 100644 --- a/src/test/java/org/springframework/hateoas/config/HypermediaWebTestClientConfigurerTest.java +++ b/src/test/java/org/springframework/hateoas/config/HypermediaWebTestClientConfigurerTest.java @@ -1,5 +1,11 @@ package org.springframework.hateoas.config; +import static org.assertj.core.api.Assertions.*; +import static org.springframework.hateoas.MediaTypes.*; +import static org.springframework.hateoas.support.ContextTester.*; + +import java.util.Collections; + import org.junit.jupiter.api.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -20,12 +26,6 @@ import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; -import java.util.Collections; - -import static org.assertj.core.api.Assertions.*; -import static org.springframework.hateoas.MediaTypes.*; -import static org.springframework.hateoas.support.ContextTester.*; - public class HypermediaWebTestClientConfigurerTest { private static MediaType FRODO_JSON = MediaType.parseMediaType("application/frodo+json"); diff --git a/src/test/java/org/springframework/hateoas/mediatype/alps/AlpsWebFluxIntegrationTest.java b/src/test/java/org/springframework/hateoas/mediatype/alps/AlpsWebFluxIntegrationTest.java index d900eaa9..0d14fb15 100644 --- a/src/test/java/org/springframework/hateoas/mediatype/alps/AlpsWebFluxIntegrationTest.java +++ b/src/test/java/org/springframework/hateoas/mediatype/alps/AlpsWebFluxIntegrationTest.java @@ -15,6 +15,11 @@ */ package org.springframework.hateoas.mediatype.alps; +import static org.assertj.core.api.Assertions.*; +import static org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType.*; + +import reactor.test.StepVerifier; + import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; @@ -29,10 +34,6 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.config.EnableWebFlux; -import reactor.test.StepVerifier; - -import static org.assertj.core.api.Assertions.*; -import static org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType.*; /** * @author Greg Turnquist diff --git a/src/test/java/org/springframework/hateoas/mediatype/collectionjson/CollectionJsonWebFluxIntegrationTest.java b/src/test/java/org/springframework/hateoas/mediatype/collectionjson/CollectionJsonWebFluxIntegrationTest.java index c2633098..37d963f4 100644 --- a/src/test/java/org/springframework/hateoas/mediatype/collectionjson/CollectionJsonWebFluxIntegrationTest.java +++ b/src/test/java/org/springframework/hateoas/mediatype/collectionjson/CollectionJsonWebFluxIntegrationTest.java @@ -15,6 +15,11 @@ */ package org.springframework.hateoas.mediatype.collectionjson; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.collection.IsCollectionWithSize.*; +import static org.springframework.hateoas.support.JsonPathUtils.*; +import static org.springframework.hateoas.support.MappingUtils.*; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -35,11 +40,6 @@ import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.config.EnableWebFlux; -import static org.hamcrest.CoreMatchers.*; -import static org.hamcrest.collection.IsCollectionWithSize.*; -import static org.springframework.hateoas.support.JsonPathUtils.*; -import static org.springframework.hateoas.support.MappingUtils.*; - /** * @author Greg Turnquist */ diff --git a/src/test/java/org/springframework/hateoas/mediatype/hal/forms/HalFormsWebFluxIntegrationTest.java b/src/test/java/org/springframework/hateoas/mediatype/hal/forms/HalFormsWebFluxIntegrationTest.java index 2c085d64..dcaf9426 100644 --- a/src/test/java/org/springframework/hateoas/mediatype/hal/forms/HalFormsWebFluxIntegrationTest.java +++ b/src/test/java/org/springframework/hateoas/mediatype/hal/forms/HalFormsWebFluxIntegrationTest.java @@ -15,6 +15,13 @@ */ package org.springframework.hateoas.mediatype.hal.forms; +import static org.assertj.core.api.Assertions.*; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.collection.IsCollectionWithSize.*; +import static org.springframework.hateoas.support.JsonPathUtils.*; + +import java.net.URI; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -38,13 +45,6 @@ import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.config.EnableWebFlux; -import java.net.URI; - -import static org.assertj.core.api.Assertions.*; -import static org.hamcrest.CoreMatchers.*; -import static org.hamcrest.collection.IsCollectionWithSize.*; -import static org.springframework.hateoas.support.JsonPathUtils.*; - /** * @author Greg Turnquist */ diff --git a/src/test/java/org/springframework/hateoas/mediatype/uber/UberWebFluxIntegrationTest.java b/src/test/java/org/springframework/hateoas/mediatype/uber/UberWebFluxIntegrationTest.java index c7c563c6..70276891 100644 --- a/src/test/java/org/springframework/hateoas/mediatype/uber/UberWebFluxIntegrationTest.java +++ b/src/test/java/org/springframework/hateoas/mediatype/uber/UberWebFluxIntegrationTest.java @@ -15,6 +15,11 @@ */ package org.springframework.hateoas.mediatype.uber; +import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.collection.IsCollectionWithSize.*; +import static org.springframework.hateoas.support.JsonPathUtils.*; +import static org.springframework.hateoas.support.MappingUtils.*; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -35,11 +40,6 @@ import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.config.EnableWebFlux; -import static org.hamcrest.CoreMatchers.*; -import static org.hamcrest.collection.IsCollectionWithSize.*; -import static org.springframework.hateoas.support.JsonPathUtils.*; -import static org.springframework.hateoas.support.MappingUtils.*; - /** * @author Greg Turnquist */ diff --git a/src/test/java/org/springframework/hateoas/server/reactive/HypermediaWebFilterTest.java b/src/test/java/org/springframework/hateoas/server/reactive/HypermediaWebFilterTest.java index 62eb44fa..df3e38f8 100644 --- a/src/test/java/org/springframework/hateoas/server/reactive/HypermediaWebFilterTest.java +++ b/src/test/java/org/springframework/hateoas/server/reactive/HypermediaWebFilterTest.java @@ -15,6 +15,13 @@ */ package org.springframework.hateoas.server.reactive; +import static org.assertj.core.api.AssertionsForInterfaceTypes.*; +import static org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType.*; +import static org.springframework.hateoas.server.reactive.WebFluxLinkBuilder.*; + +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; @@ -31,12 +38,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import static org.assertj.core.api.AssertionsForInterfaceTypes.*; -import static org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType.*; -import static org.springframework.hateoas.server.reactive.WebFluxLinkBuilder.*; /** * Verify WebFlux properly activates the {@link org.springframework.web.filter.reactive.ServerWebExchangeContextFilter}.