Skip to content

Commit ba29a1d

Browse files
committed
Removing the static import.
1 parent 11b65ce commit ba29a1d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestWithDefaultErrorHandlerTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@
2121

2222
import org.springframework.beans.factory.annotation.Autowired;
2323
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
24+
import org.springframework.http.HttpStatus;
2425
import org.springframework.security.test.context.support.WithMockUser;
2526
import org.springframework.test.context.junit4.SpringRunner;
2627
import org.springframework.test.web.reactive.server.WebTestClient;
2728

28-
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
29-
3029
/**
3130
* Tests for {@link WebFluxTest} when no explicit exception handler is defined.
3231
*
@@ -44,11 +43,11 @@ public class WebFluxTestWithDefaultErrorHandlerTests {
4443
public void defaultWebExceptionHandling() {
4544
// @formatter:off
4645
this.webClient.get().uri("/one/error").exchange()
47-
.expectStatus().isEqualTo(INTERNAL_SERVER_ERROR)
46+
.expectStatus().isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR)
4847
.expectBody()
4948
.jsonPath("$.timestamp").exists()
5049
.jsonPath("$.status").isEqualTo(500)
51-
.jsonPath("$.error").isEqualTo(INTERNAL_SERVER_ERROR.getReasonPhrase())
50+
.jsonPath("$.error").isEqualTo("Internal Server Error")
5251
.jsonPath("$.path").isEqualTo("/one/error")
5352
.jsonPath("$.message").isEqualTo("foo");
5453
// @formatter:on

0 commit comments

Comments
 (0)