16
16
17
17
package org .springframework .cloud .gateway .filter .factory ;
18
18
19
- import com .google .common .collect .Maps ;
19
+ import java .util .HashMap ;
20
+ import java .util .Map ;
21
+
20
22
import org .junit .jupiter .api .Test ;
23
+
21
24
import org .springframework .beans .factory .annotation .Value ;
22
25
import org .springframework .boot .SpringBootConfiguration ;
23
26
import org .springframework .boot .autoconfigure .EnableAutoConfiguration ;
33
36
import org .springframework .test .annotation .DirtiesContext ;
34
37
import org .springframework .test .context .ActiveProfiles ;
35
38
36
- import java .util .HashMap ;
37
- import java .util .Map ;
38
-
39
39
import static org .assertj .core .api .Assertions .assertThat ;
40
40
import static org .springframework .boot .test .context .SpringBootTest .WebEnvironment .RANDOM_PORT ;
41
41
@@ -72,7 +72,7 @@ public void responseHeadersNotPresentAndFilterWorks() {
72
72
testClient .patch ()
73
73
.uri ("/headers" )
74
74
.header ("Host" , "www.addresponseheadersifnotpresenttest.org" )
75
- .bodyValue (Maps . newHashMap ())
75
+ .bodyValue (new HashMap <> ())
76
76
.exchange ()
77
77
.expectHeader ()
78
78
.valueEquals (TEST_HEADER_KEY1 , TEST_HEADER_VALUE_A );
@@ -102,7 +102,7 @@ public void responseMultipleHeadersNotPresentAndFilterWorks() {
102
102
testClient .patch ()
103
103
.uri ("/headers" )
104
104
.header ("Host" , "www.addmultipleresponseheadersifnotpresenttest.org" )
105
- .bodyValue (Maps . newHashMap ())
105
+ .bodyValue (new HashMap <> ())
106
106
.exchange ()
107
107
.expectHeader ()
108
108
.valueEquals (TEST_HEADER_KEY1 , TEST_HEADER_VALUE_A )
@@ -132,7 +132,7 @@ public void responseHeadersNotPresentAndFilterWorksJavaDsl() {
132
132
testClient .patch ()
133
133
.uri ("/headers" )
134
134
.header ("Host" , "www.addresponseheadersifnotpresentjavadsl.org" )
135
- .bodyValue (Maps . newHashMap ())
135
+ .bodyValue (new HashMap <> ())
136
136
.exchange ()
137
137
.expectHeader ()
138
138
.valueEquals ("X-Response-Java-Example" , "Value-www" );
@@ -143,7 +143,7 @@ public void responseMultipleHeadersNotPresentAndFilterWorksJavaDsl() {
143
143
testClient .patch ()
144
144
.uri ("/headers" )
145
145
.header ("Host" , "www.addmultipleresponseheadersifnotpresentjavadsl.org" )
146
- .bodyValue (Maps . newHashMap ())
146
+ .bodyValue (new HashMap <> ())
147
147
.exchange ()
148
148
.expectHeader ()
149
149
.valueEquals ("X-Response-Java-Example" , "Value-www" , "ValueX" , "ValueY" , "ValueZ" );
0 commit comments