From cfefcee788272d04b811849be626afed5c3e21ac Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 13 Jan 2022 08:07:08 +0100 Subject: [PATCH] Polishing See gh-27926 --- .../resulthandlers/PrintingResultHandlerIntegrationTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resulthandlers/PrintingResultHandlerIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resulthandlers/PrintingResultHandlerIntegrationTests.java index 21822d73176..afe8da964e9 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resulthandlers/PrintingResultHandlerIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resulthandlers/PrintingResultHandlerIntegrationTests.java @@ -69,10 +69,10 @@ class PrintingResultHandlerIntegrationTests { 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!")