diff --git a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/support/rawhttp/HttpRequestTesterTest.java b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/support/rawhttp/HttpRequestTesterTest.java index db2674d18e77..9a2efce530bf 100644 --- a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/support/rawhttp/HttpRequestTesterTest.java +++ b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-integration/src/test/java/org/eclipse/jetty/ee10/test/support/rawhttp/HttpRequestTesterTest.java @@ -36,12 +36,13 @@ public void testBasicHttp10Request() throws IOException ByteBuffer bBuff = request.generate(); - StringBuffer expectedRequest = new StringBuffer(); - expectedRequest.append("GET /uri HTTP/1.0\r\n"); - expectedRequest.append("Host: fakehost\r\n"); - expectedRequest.append("\r\n"); + String expectedRequest = """ + GET /uri HTTP/1.0\r + Host: fakehost\r + \r + """; - assertEquals(expectedRequest.toString(), BufferUtil.toString(bBuff)); + assertEquals(expectedRequest, BufferUtil.toString(bBuff)); } @Test @@ -57,14 +58,14 @@ public void testBasicHttp11Request() throws IOException ByteBuffer bBuff = request.generate(); - StringBuffer expectedRequest = new StringBuffer(); - expectedRequest.append("GET /uri HTTP/1.1\r\n"); - expectedRequest.append("Host: fakehost\r\n"); - expectedRequest.append("Content-Length: 3\r\n"); - expectedRequest.append("Connection: close\r\n"); - expectedRequest.append("\r\n"); - expectedRequest.append("aaa"); + String expectedRequest = """ + GET /uri HTTP/1.1\r + Host: fakehost\r + Content-Length: 3\r + Connection: close\r + \r + aaa"""; - assertEquals(expectedRequest.toString(), BufferUtil.toString(bBuff)); + assertEquals(expectedRequest, BufferUtil.toString(bBuff)); } }