Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Jan 13, 2022
1 parent 5fb58e5 commit cfefcee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ void printMvcResultsToWriterWithJsonResponseBodyInterpretedAsUtf8() throws Excep

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

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

0 comments on commit cfefcee

Please sign in to comment.