Skip to content

Commit cfefcee

Browse files
committed
Polishing
See gh-27926
1 parent 5fb58e5 commit cfefcee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resulthandlers/PrintingResultHandlerIntegrationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ void printMvcResultsToWriterWithJsonResponseBodyInterpretedAsUtf8() throws Excep
6969

7070
standaloneSetup(new SimpleController()).build()
7171
// "Hallöchen" is German slang for "hello".
72-
.perform(get("/utf8").accept(MediaType.APPLICATION_JSON).content("Hallöchen, Welt!".getBytes()).characterEncoding(UTF_8))
72+
.perform(get("/utf8").accept(MediaType.APPLICATION_JSON).content("Hallöchen, Welt!".getBytes(UTF_8)).characterEncoding(UTF_8))
7373
.andDo(print(writer))
7474
// "Grüß dich!" is German for "greetings to you".
75-
.andExpect(content().bytes("Grüß dich!".getBytes()));
75+
.andExpect(content().bytes("Grüß dich!".getBytes(UTF_8)));
7676

7777
assertThat(writer).asString()
7878
.contains("Body = Hallöchen, Welt!")

0 commit comments

Comments
 (0)