This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 331b451046a6ccab11d2c334e4c50ad82ddbb9af Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Mon Jan 26 20:34:27 2026 +0000 (chores): ensure usage of text blocks camel-jetty --- .../rest/RestJettyNoContentRestConfigTest.java | 22 +++++++++++++--------- .../jetty/rest/RestJettyNoContentTest.java | 22 +++++++++++++--------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentRestConfigTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentRestConfigTest.java index 93af3e58500e..bad2a6b73535 100644 --- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentRestConfigTest.java +++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentRestConfigTest.java @@ -79,8 +79,10 @@ public class RestJettyNoContentRestConfigTest extends BaseJettyTest { }); assertEquals(200, exchange.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE)); - assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + - "<address:address xmlns:address=\"http://www.camel.apache.org/jaxb/example/address/1\"/>\n", + assertEquals(""" + <?xml version="1.0" encoding="UTF-8" standalone="yes"?> + <address:address xmlns:address="http://www.camel.apache.org/jaxb/example/address/1"/> + """, MessageHelper.extractBodyAsString(exchange.getMessage())); } @@ -120,13 +122,15 @@ public class RestJettyNoContentRestConfigTest extends BaseJettyTest { }); assertEquals(200, exchange.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE)); - assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + - "<address:address xmlns:address=\"http://www.camel.apache.org/jaxb/example/address/1\">\n" + - " <address:street>Main Street</address:street>\n" + - " <address:streetNumber>3a</address:streetNumber>\n" + - " <address:zip>65843</address:zip>\n" + - " <address:city>Sulzbach</address:city>\n" + - "</address:address>\n", + assertEquals(""" + <?xml version="1.0" encoding="UTF-8" standalone="yes"?> + <address:address xmlns:address="http://www.camel.apache.org/jaxb/example/address/1"> + <address:street>Main Street</address:street> + <address:streetNumber>3a</address:streetNumber> + <address:zip>65843</address:zip> + <address:city>Sulzbach</address:city> + </address:address> + """, MessageHelper.extractBodyAsString(exchange.getMessage())); } diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentTest.java index 0be2ad8adc76..30acebbfc74a 100644 --- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentTest.java +++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyNoContentTest.java @@ -53,8 +53,10 @@ public class RestJettyNoContentTest extends BaseJettyTest { }); assertEquals(200, exchange.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE)); - assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + - "<address:address xmlns:address=\"http://www.camel.apache.org/jaxb/example/address/1\"/>\n", + assertEquals(""" + <?xml version="1.0" encoding="UTF-8" standalone="yes"?> + <address:address xmlns:address="http://www.camel.apache.org/jaxb/example/address/1"/> + """, MessageHelper.extractBodyAsString(exchange.getMessage())); } @@ -120,13 +122,15 @@ public class RestJettyNoContentTest extends BaseJettyTest { }); assertEquals(200, exchange.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE)); - assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + - "<address:address xmlns:address=\"http://www.camel.apache.org/jaxb/example/address/1\">\n" + - " <address:street>Main Street</address:street>\n" + - " <address:streetNumber>3a</address:streetNumber>\n" + - " <address:zip>65843</address:zip>\n" + - " <address:city>Sulzbach</address:city>\n" + - "</address:address>\n", + assertEquals(""" + <?xml version="1.0" encoding="UTF-8" standalone="yes"?> + <address:address xmlns:address="http://www.camel.apache.org/jaxb/example/address/1"> + <address:street>Main Street</address:street> + <address:streetNumber>3a</address:streetNumber> + <address:zip>65843</address:zip> + <address:city>Sulzbach</address:city> + </address:address> + """, MessageHelper.extractBodyAsString(exchange.getMessage())); }
