Skip to content

Commit a048c4d

Browse files
committed
fix formart
Signed-off-by: joecqupt <[email protected]>
1 parent 7cbfcb6 commit a048c4d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/AddResponseHeadersIfNotPresentGatewayFilterFactoryTests.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616

1717
package org.springframework.cloud.gateway.filter.factory;
1818

19-
import com.google.common.collect.Maps;
19+
import java.util.HashMap;
20+
import java.util.Map;
21+
2022
import org.junit.jupiter.api.Test;
23+
2124
import org.springframework.beans.factory.annotation.Value;
2225
import org.springframework.boot.SpringBootConfiguration;
2326
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -33,9 +36,6 @@
3336
import org.springframework.test.annotation.DirtiesContext;
3437
import org.springframework.test.context.ActiveProfiles;
3538

36-
import java.util.HashMap;
37-
import java.util.Map;
38-
3939
import static org.assertj.core.api.Assertions.assertThat;
4040
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
4141

@@ -72,7 +72,7 @@ public void responseHeadersNotPresentAndFilterWorks() {
7272
testClient.patch()
7373
.uri("/headers")
7474
.header("Host", "www.addresponseheadersifnotpresenttest.org")
75-
.bodyValue(Maps.newHashMap())
75+
.bodyValue(new HashMap<>())
7676
.exchange()
7777
.expectHeader()
7878
.valueEquals(TEST_HEADER_KEY1, TEST_HEADER_VALUE_A);
@@ -102,7 +102,7 @@ public void responseMultipleHeadersNotPresentAndFilterWorks() {
102102
testClient.patch()
103103
.uri("/headers")
104104
.header("Host", "www.addmultipleresponseheadersifnotpresenttest.org")
105-
.bodyValue(Maps.newHashMap())
105+
.bodyValue(new HashMap<>())
106106
.exchange()
107107
.expectHeader()
108108
.valueEquals(TEST_HEADER_KEY1, TEST_HEADER_VALUE_A)
@@ -132,7 +132,7 @@ public void responseHeadersNotPresentAndFilterWorksJavaDsl() {
132132
testClient.patch()
133133
.uri("/headers")
134134
.header("Host", "www.addresponseheadersifnotpresentjavadsl.org")
135-
.bodyValue(Maps.newHashMap())
135+
.bodyValue(new HashMap<>())
136136
.exchange()
137137
.expectHeader()
138138
.valueEquals("X-Response-Java-Example", "Value-www");
@@ -143,7 +143,7 @@ public void responseMultipleHeadersNotPresentAndFilterWorksJavaDsl() {
143143
testClient.patch()
144144
.uri("/headers")
145145
.header("Host", "www.addmultipleresponseheadersifnotpresentjavadsl.org")
146-
.bodyValue(Maps.newHashMap())
146+
.bodyValue(new HashMap<>())
147147
.exchange()
148148
.expectHeader()
149149
.valueEquals("X-Response-Java-Example", "Value-www", "ValueX", "ValueY", "ValueZ");

0 commit comments

Comments
 (0)