16
16
17
17
package com .netflix .zuul .message ;
18
18
19
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
20
+ import static org .junit .jupiter .api .Assertions .assertFalse ;
21
+ import static org .junit .jupiter .api .Assertions .assertNull ;
22
+ import static org .junit .jupiter .api .Assertions .assertTrue ;
23
+
19
24
import com .netflix .zuul .context .SessionContext ;
20
25
import io .netty .buffer .Unpooled ;
21
26
import io .netty .handler .codec .http .DefaultHttpContent ;
22
27
import io .netty .handler .codec .http .DefaultLastHttpContent ;
23
28
import io .netty .handler .codec .http .HttpContent ;
29
+ import java .nio .charset .StandardCharsets ;
24
30
import org .junit .jupiter .api .Test ;
25
31
import org .junit .jupiter .api .extension .ExtendWith ;
26
32
import org .mockito .junit .jupiter .MockitoExtension ;
27
33
28
- import java .nio .charset .StandardCharsets ;
29
-
30
- import static org .junit .jupiter .api .Assertions .*;
31
-
32
34
@ ExtendWith (MockitoExtension .class )
33
35
class ZuulMessageImplTest {
34
36
private static final String TEXT1 = "Hello World!" ;
@@ -64,7 +66,7 @@ void testBufferBody2GetBody() {
64
66
final String body = new String (msg .getBody ());
65
67
assertTrue (msg .hasBody ());
66
68
assertTrue (msg .hasCompleteBody ());
67
- assertEquals (TEXT1 , body );
69
+ assertEquals ("Hello World!" , body );
68
70
assertEquals (0 , msg .getHeaders ().getAll ("Content-Length" ).size ());
69
71
}
70
72
@@ -77,7 +79,7 @@ void testBufferBody3GetBody() {
77
79
final String body = new String (msg .getBody ());
78
80
assertTrue (msg .hasBody ());
79
81
assertTrue (msg .hasCompleteBody ());
80
- assertEquals (TEXT1 , body );
82
+ assertEquals ("Hello World!" , body );
81
83
assertEquals (0 , msg .getHeaders ().getAll ("Content-Length" ).size ());
82
84
}
83
85
@@ -90,7 +92,7 @@ void testBufferBody3GetBodyAsText() {
90
92
final String body = msg .getBodyAsText ();
91
93
assertTrue (msg .hasBody ());
92
94
assertTrue (msg .hasCompleteBody ());
93
- assertEquals (TEXT1 , body );
95
+ assertEquals ("Hello World!" , body );
94
96
assertEquals (0 , msg .getHeaders ().getAll ("Content-Length" ).size ());
95
97
}
96
98
0 commit comments