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 09dd3be37e182927950f20d18440b36d8da832f7
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Mon Jan 26 17:54:50 2026 +0000

    (chores): ensure usage of text blocks components/camel-as2/camel-as2-api
---
 .../component/as2/api/protocol/ResponseMDN.java    |  18 +-
 .../component/as2/api/AS2MessageTestBase.java      |  53 +++---
 .../as2/api/entity/CompressedEntityTest.java       |  42 ++---
 .../component/as2/api/entity/EntityParserTest.java | 195 +++++++++++----------
 .../DispositionNotificationContentUtilsTest.java   |  25 +--
 .../camel/component/as2/api/util/MicUtilsTest.java | 108 ++++++------
 6 files changed, 231 insertions(+), 210 deletions(-)

diff --git 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
index b4dbf24885f2..176cfcb0ebf9 100644
--- 
a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
+++ 
b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/protocol/ResponseMDN.java
@@ -73,14 +73,16 @@ public class ResponseMDN implements HttpResponseInterceptor 
{
 
     public static final String DISPOSITION_MODIFIER = "Disposition-Modifier";
 
-    private static final String DEFAULT_MDN_MESSAGE_TEMPLATE = "MDN for -\n"
-                                                               + " Message ID: 
$requestHeaders[\"Message-Id\"]\n"
-                                                               + "  Subject: 
$requestHeaders[\"Subject\"]\n"
-                                                               + "  Date: 
$requestHeaders[\"Date\"]\n"
-                                                               + "  From: 
$requestHeaders[\"AS2-From\"]\n"
-                                                               + "  To: 
$requestHeaders[\"AS2-To\"]\n"
-                                                               + "  Received 
on: $responseHeaders[\"Date\"]\n"
-                                                               + " Status: 
$dispositionType \n";
+    private static final String DEFAULT_MDN_MESSAGE_TEMPLATE = """
+            MDN for -
+             Message ID: $requestHeaders["Message-Id"]
+              Subject: $requestHeaders["Subject"]
+              Date: $requestHeaders["Date"]
+              From: $requestHeaders["AS2-From"]
+              To: $requestHeaders["AS2-To"]
+              Received on: $responseHeaders["Date"]
+             Status: $dispositionType
+            """;
 
     private static final Logger LOG = 
LoggerFactory.getLogger(ResponseMDN.class);
 
diff --git 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java
 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java
index 2938a0328099..3289e1431418 100644
--- 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java
+++ 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTestBase.java
@@ -55,32 +55,33 @@ import static org.junit.jupiter.api.Assertions.fail;
 
 public class AS2MessageTestBase {
 
-    protected static final String EDI_MESSAGE = 
"UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'\n"
-                                                + 
"UNH+00000000000117+INVOIC:D:97B:UN'\n"
-                                                + "BGM+380+342459+9'\n"
-                                                + "DTM+3:20060515:102'\n"
-                                                + "RFF+ON:521052'\n"
-                                                + 
"NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'\n"
-                                                + 
"NAD+SE+005435656::16++GENERAL WIDGET COMPANY'\n"
-                                                + "CUX+1:USD'\n"
-                                                + "LIN+1++157870:IN'\n"
-                                                + "IMD+F++:::WIDGET'\n"
-                                                + "QTY+47:1020:EA'\n"
-                                                + "ALI+US'\n"
-                                                + "MOA+203:1202.58'\n"
-                                                + "PRI+INV:1.179'\n"
-                                                + "LIN+2++157871:IN'\n"
-                                                + "IMD+F++:::DIFFERENT 
WIDGET'\n"
-                                                + "QTY+47:20:EA'\n"
-                                                + "ALI+JP'\n"
-                                                + "MOA+203:410'\n"
-                                                + "PRI+INV:20.5'\n"
-                                                + "UNS+S'\n"
-                                                + "MOA+39:2137.58'\n"
-                                                + "ALC+C+ABG'\n"
-                                                + "MOA+8:525'\n"
-                                                + "UNT+23+00000000000117'\n"
-                                                + "UNZ+1+00000000000778'";
+    protected static final String EDI_MESSAGE = """
+            UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
+            UNH+00000000000117+INVOIC:D:97B:UN'
+            BGM+380+342459+9'
+            DTM+3:20060515:102'
+            RFF+ON:521052'
+            NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
+            NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
+            CUX+1:USD'
+            LIN+1++157870:IN'
+            IMD+F++:::WIDGET'
+            QTY+47:1020:EA'
+            ALI+US'
+            MOA+203:1202.58'
+            PRI+INV:1.179'
+            LIN+2++157871:IN'
+            IMD+F++:::DIFFERENT WIDGET'
+            QTY+47:20:EA'
+            ALI+JP'
+            MOA+203:410'
+            PRI+INV:20.5'
+            UNS+S'
+            MOA+39:2137.58'
+            ALC+C+ABG'
+            MOA+8:525'
+            UNT+23+00000000000117'
+            UNZ+1+00000000000778'""";
 
     protected static final String METHOD = "POST";
     protected static final String TARGET_HOST = "localhost";
diff --git 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/CompressedEntityTest.java
 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/CompressedEntityTest.java
index a13946863126..9d3de5210033 100644
--- 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/CompressedEntityTest.java
+++ 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/CompressedEntityTest.java
@@ -29,31 +29,33 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class CompressedEntityTest {
 
-    public static final String TEXT_PLAIN_CONTENT = "MDN for -\r\n"
-                                                    + " Message ID: 
<200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                    + "  From: \"\\\"  as2Name 
 \\\"\"\r\n"
-                                                    + "  To: \"0123456780000\""
-                                                    + "  Received on: 
2002-07-31 at 09:34:14 (EDT)\r\n"
-                                                    + " Status: processed\r\n"
-                                                    + " Comment: This is not a 
guarantee that the message has\r\n"
-                                                    + "  been completely 
processed or &understood by the receiving\r\n"
-                                                    + "  translator\r\n"
-                                                    + "\r\n";
+    public static final String TEXT_PLAIN_CONTENT = """
+            MDN for -\r
+             Message ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+              From: "\\"  as2Name  \\""\r
+              To: "0123456780000"  Received on: 2002-07-31 at 09:34:14 (EDT)\r
+             Status: processed\r
+             Comment: This is not a guarantee that the message has\r
+              been completely processed or &understood by the receiving\r
+              translator\r
+            \r
+            """;
 
     public static final String TEXT_PLAIN_CONTENT_CHARSET_NAME = "US-ASCII";
 
     public static final String TEXT_PLAIN_CONTENT_TRANSFER_ENCODING = "7bit";
 
-    public static final String EXPECTED_TEXT_PLAIN_CONTENT = "MDN for -\r\n"
-                                                             + " Message ID: 
<200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                             + "  From: \"\\\" 
 as2Name  \\\"\"\r\n"
-                                                             + "  To: 
\"0123456780000\""
-                                                             + "  Received on: 
2002-07-31 at 09:34:14 (EDT)\r\n"
-                                                             + " Status: 
processed\r\n"
-                                                             + " Comment: This 
is not a guarantee that the message has\r\n"
-                                                             + "  been 
completely processed or &understood by the receiving\r\n"
-                                                             + "  
translator\r\n"
-                                                             + "\r\n";
+    public static final String EXPECTED_TEXT_PLAIN_CONTENT = """
+            MDN for -\r
+             Message ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+              From: "\\"  as2Name  \\""\r
+              To: "0123456780000"  Received on: 2002-07-31 at 09:34:14 (EDT)\r
+             Status: processed\r
+             Comment: This is not a guarantee that the message has\r
+              been completely processed or &understood by the receiving\r
+              translator\r
+            \r
+            """;
 
     public static final String 
APPLICATION_PKCS7_MIME_COMPRESSED_TRANSFER_ENCODING = "base64";
 
diff --git 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/EntityParserTest.java
 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/EntityParserTest.java
index 168ef7f9022e..b0ec8d68091d 100644
--- 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/EntityParserTest.java
+++ 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/entity/EntityParserTest.java
@@ -82,68 +82,74 @@ public class EntityParserTest {
     public static final String REPORT_TYPE_HEADER_VALUE
             = "disposition-notification; 
boundary=\"----=_Part_56_1672293592.1028122454656\"\r\n";
 
-    public static final String DISPOSITION_NOTIFICATION_REPORT_CONTENT = "\r\n"
-                                                                         + 
"------=_Part_56_1672293592.1028122454656\r\n"
-                                                                         + 
"Content-Type: text/plain\r\n"
-                                                                         + 
"Content-Transfer-Encoding: 7bit\r\n" + "\r\n"
-                                                                         + 
"MDN for -\r\n"
-                                                                         + " 
Message ID: <200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                                         + "  
From: \"\\\"  as2Name  \\\"\"\r\n"
-                                                                         + "  
To: \"0123456780000\""
-                                                                         + "  
Received on: 2002-07-31 at 09:34:14 (EDT)\r\n"
-                                                                         + " 
Status: processed\r\n"
-                                                                         + " 
Comment: This is not a guarantee that the message has\r\n"
-                                                                         + "  
been completely processed or &understood by the receiving\r\n"
-                                                                         + "  
translator\r\n" + "\r\n"
-                                                                         + 
"------=_Part_56_1672293592.1028122454656\r\n"
-                                                                         + 
"Content-Type: message/disposition-notification\r\n"
-                                                                         + 
"Content-Transfer-Encoding: 7bit\r\n" + "\r\n"
-                                                                         + 
"Reporting-UA: AS2 Server\r\n"
-                                                                         + 
"MDN-Gateway: dns; example.com\r\n"
-                                                                         + 
"Original-Recipient: rfc822; 0123456780000\r\n"
-                                                                         + 
"Final-Recipient: rfc822; 0123456780000\r\n"
-                                                                         + 
"Original-Message-ID: <200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                                         + 
"Disposition: automatic-action/MDN-sent-automatically;\r\n"
-                                                                         + "  
processed/warning: you're awesome\r\n"
-                                                                         + 
"Failure: oops-a-failure\r\n"
-                                                                         + 
"Error: oops-an-error\r\n"
-                                                                         + 
"Warning: oops-a-warning\r\n"
-                                                                         + 
"Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r\n"
-                                                                         + 
"\r\n"
-                                                                         + 
"------=_Part_56_1672293592.1028122454656--\r\n";
+    public static final String DISPOSITION_NOTIFICATION_REPORT_CONTENT = """
+            \r
+            ------=_Part_56_1672293592.1028122454656\r
+            Content-Type: text/plain\r
+            Content-Transfer-Encoding: 7bit\r
+            \r
+            MDN for -\r
+             Message ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+              From: "\\"  as2Name  \\""\r
+              To: "0123456780000"  Received on: 2002-07-31 at 09:34:14 (EDT)\r
+             Status: processed\r
+             Comment: This is not a guarantee that the message has\r
+              been completely processed or &understood by the receiving\r
+              translator\r
+            \r
+            ------=_Part_56_1672293592.1028122454656\r
+            Content-Type: message/disposition-notification\r
+            Content-Transfer-Encoding: 7bit\r
+            \r
+            Reporting-UA: AS2 Server\r
+            MDN-Gateway: dns; example.com\r
+            Original-Recipient: rfc822; 0123456780000\r
+            Final-Recipient: rfc822; 0123456780000\r
+            Original-Message-ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+            Disposition: automatic-action/MDN-sent-automatically;\r
+              processed/warning: you're awesome\r
+            Failure: oops-a-failure\r
+            Error: oops-an-error\r
+            Warning: oops-a-warning\r
+            Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r
+            \r
+            ------=_Part_56_1672293592.1028122454656--\r
+            """;
 
     // version of the Disposition Notification Report without any folded body 
parts that would be unfolded when the entity is parsed
     // modifying the report
-    public static final String 
DISPOSITION_NOTIFICATION_REPORT_CONTENT_UNFOLDED = "\r\n"
-                                                                               
   + "------=_Part_56_1672293592.1028122454656\r\n"
-                                                                               
   + "Content-Type: text/plain\r\n"
-                                                                               
   + "Content-Transfer-Encoding: 7bit\r\n"
-                                                                               
   + "\r\n"
-                                                                               
   + "MDN for -\r\n"
-                                                                               
   + " Message ID: <200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                                               
   + "  From: \"\\\"  as2Name  \\\"\"\r\n"
-                                                                               
   + "  To: \"0123456780000\""
-                                                                               
   + "  Received on: 2002-07-31 at 09:34:14 (EDT)\r\n"
-                                                                               
   + " Status: processed\r\n"
-                                                                               
   + " Comment: This is not a guarantee that the message has\r\n"
-                                                                               
   + "  been completely processed or &understood by the receiving\r\n"
-                                                                               
   + "  translator\r\n" + "\r\n"
-                                                                               
   + "------=_Part_56_1672293592.1028122454656\r\n"
-                                                                               
   + "Content-Type: message/disposition-notification\r\n"
-                                                                               
   + "Content-Transfer-Encoding: 7bit\r\n"
-                                                                               
   + "\r\n"
-                                                                               
   + "Reporting-UA: AS2 Server\r\n"
-                                                                               
   + "MDN-Gateway: dns; example.com\r\n"
-                                                                               
   + "Original-Recipient: rfc822; 0123456780000\r\n"
-                                                                               
   + "Final-Recipient: rfc822; 0123456780000\r\n"
-                                                                               
   + "Original-Message-ID: <200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                                               
   + "Disposition: automatic-action/MDN-sent-automatically; rocessed/warning: 
you're awesome\r\n"
-                                                                               
   + "Failure: oops-a-failure\r\n"
-                                                                               
   + "Error: oops-an-error\r\n"
-                                                                               
   + "Warning: oops-a-warning\r\n"
-                                                                               
   + "Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r\n"
-                                                                               
   + "\r\n"
-                                                                               
   + "------=_Part_56_1672293592.1028122454656--\r\n";
+    public static final String 
DISPOSITION_NOTIFICATION_REPORT_CONTENT_UNFOLDED = """
+            \r
+            ------=_Part_56_1672293592.1028122454656\r
+            Content-Type: text/plain\r
+            Content-Transfer-Encoding: 7bit\r
+            \r
+            MDN for -\r
+             Message ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+              From: "\\"  as2Name  \\""\r
+              To: "0123456780000"  Received on: 2002-07-31 at 09:34:14 (EDT)\r
+             Status: processed\r
+             Comment: This is not a guarantee that the message has\r
+              been completely processed or &understood by the receiving\r
+              translator\r
+            \r
+            ------=_Part_56_1672293592.1028122454656\r
+            Content-Type: message/disposition-notification\r
+            Content-Transfer-Encoding: 7bit\r
+            \r
+            Reporting-UA: AS2 Server\r
+            MDN-Gateway: dns; example.com\r
+            Original-Recipient: rfc822; 0123456780000\r
+            Final-Recipient: rfc822; 0123456780000\r
+            Original-Message-ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+            Disposition: automatic-action/MDN-sent-automatically; 
rocessed/warning: you're awesome\r
+            Failure: oops-a-failure\r
+            Error: oops-an-error\r
+            Warning: oops-a-warning\r
+            Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r
+            \r
+            ------=_Part_56_1672293592.1028122454656--\r
+            """;
 
     public static final String 
DISPOSITION_NOTIFICATION_REPORT_CONTENT_BOUNDARY = 
"----=_Part_56_1672293592.1028122454656";
 
@@ -151,17 +157,18 @@ public class EntityParserTest {
 
     public static final String 
DISPOSITION_NOTIFICATION_REPORT_CONTENT_TRANSFER_ENCODING = "7bit";
 
-    public static final String TEXT_PLAIN_CONTENT = "MDN for -\r\n"
-                                                    + " Message ID: 
<200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                    + "  From: \"\\\"  as2Name 
 \\\"\"\r\n"
-                                                    + "  To: \"0123456780000\""
-                                                    + "  Received on: 
2002-07-31 at 09:34:14 (EDT)\r\n"
-                                                    + " Status: processed\r\n"
-                                                    + " Comment: This is not a 
guarantee that the message has\r\n"
-                                                    + "  been completely 
processed or &understood by the receiving\r\n"
-                                                    + "  translator\r\n"
-                                                    + "\r\n"
-                                                    + 
"------=_Part_56_1672293592.1028122454656--\r\n";
+    public static final String TEXT_PLAIN_CONTENT = """
+            MDN for -\r
+             Message ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+              From: "\\"  as2Name  \\""\r
+              To: "0123456780000"  Received on: 2002-07-31 at 09:34:14 (EDT)\r
+             Status: processed\r
+             Comment: This is not a guarantee that the message has\r
+              been completely processed or &understood by the receiving\r
+              translator\r
+            \r
+            ------=_Part_56_1672293592.1028122454656--\r
+            """;
 
     public static final String TEXT_PLAIN_CONTENT_BOUNDARY = 
"----=_Part_56_1672293592.1028122454656";
 
@@ -169,28 +176,32 @@ public class EntityParserTest {
 
     public static final String TEXT_PLAIN_CONTENT_TRANSFER_ENCODING = "7bit";
 
-    public static final String EXPECTED_TEXT_PLAIN_CONTENT = "MDN for -\r\n"
-                                                             + " Message ID: 
<200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                             + "  From: \"\\\" 
 as2Name  \\\"\"\r\n"
-                                                             + "  To: 
\"0123456780000\""
-                                                             + "  Received on: 
2002-07-31 at 09:34:14 (EDT)\r\n"
-                                                             + " Status: 
processed\r\n"
-                                                             + " Comment: This 
is not a guarantee that the message has\r\n"
-                                                             + "  been 
completely processed or &understood by the receiving\r\n"
-                                                             + "  
translator\r\n";
-
-    public static final String DISPOSITION_NOTIFICATION_CONTENT = 
"Reporting-UA: AS2 Server\r\n"
-                                                                  + 
"MDN-Gateway: dns; example.com\r\n"
-                                                                  + 
"Original-Recipient: rfc822; 0123456780000\r\n"
-                                                                  + 
"Final-Recipient: rfc822; 0123456780000\r\n"
-                                                                  + 
"Original-Message-ID: <200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                                  + 
"Disposition: automatic-action/MDN-sent-automatically;\r\n"
-                                                                  + "  
processed/warning: you're awesome\r\n"
-                                                                  + "Failure: 
oops-a-failure\r\n" + "Error: oops-an-error\r\n"
-                                                                  + "Warning: 
oops-a-warning\r\n"
-                                                                  + 
"Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r\n"
-                                                                  + "\r\n"
-                                                                  + 
"------=_Part_56_1672293592.1028122454656--\r\n";
+    public static final String EXPECTED_TEXT_PLAIN_CONTENT = """
+            MDN for -\r
+             Message ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+              From: "\\"  as2Name  \\""\r
+              To: "0123456780000"  Received on: 2002-07-31 at 09:34:14 (EDT)\r
+             Status: processed\r
+             Comment: This is not a guarantee that the message has\r
+              been completely processed or &understood by the receiving\r
+              translator\r
+            """;
+
+    public static final String DISPOSITION_NOTIFICATION_CONTENT = """
+            Reporting-UA: AS2 Server\r
+            MDN-Gateway: dns; example.com\r
+            Original-Recipient: rfc822; 0123456780000\r
+            Final-Recipient: rfc822; 0123456780000\r
+            Original-Message-ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+            Disposition: automatic-action/MDN-sent-automatically;\r
+              processed/warning: you're awesome\r
+            Failure: oops-a-failure\r
+            Error: oops-an-error\r
+            Warning: oops-a-warning\r
+            Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r
+            \r
+            ------=_Part_56_1672293592.1028122454656--\r
+            """;
 
     public static final String DISPOSITION_NOTIFICATION_CONTENT_BOUNDARY = 
"----=_Part_56_1672293592.1028122454656";
 
diff --git 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/DispositionNotificationContentUtilsTest.java
 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/DispositionNotificationContentUtilsTest.java
index d4d3698cae43..5bd8c34b10c3 100644
--- 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/DispositionNotificationContentUtilsTest.java
+++ 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/DispositionNotificationContentUtilsTest.java
@@ -39,17 +39,20 @@ import static 
org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class DispositionNotificationContentUtilsTest {
 
-    public static final String DISPOSITION_NOTIFICATION_CONTENT = 
"Reporting-UA: AS2 Server\r\n"
-                                                                  + 
"MDN-Gateway: dns; example.com\r\n"
-                                                                  + 
"Original-Recipient: rfc822; 0123456780000\r\n"
-                                                                  + 
"Final-Recipient: rfc822; 0123456780000\r\n"
-                                                                  + 
"Original-Message-ID: <200207310834482A70BF63@\\\"~~foo~~\\\">\r\n"
-                                                                  + 
"Disposition: automatic-action/MDN-sent-automatically;\r\n"
-                                                                  + "  
processed/warning: you're awesome\r\n"
-                                                                  + "Failure: 
oops-a-failure\r\n"
-                                                                  + "Error: 
oops-an-error\r\n" + "Warning: oops-a-warning\r\n"
-                                                                  + 
"Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r\n"
-                                                                  + "\r\n";
+    public static final String DISPOSITION_NOTIFICATION_CONTENT = """
+            Reporting-UA: AS2 Server\r
+            MDN-Gateway: dns; example.com\r
+            Original-Recipient: rfc822; 0123456780000\r
+            Final-Recipient: rfc822; 0123456780000\r
+            Original-Message-ID: <200207310834482A70BF63@\\"~~foo~~\\">\r
+            Disposition: automatic-action/MDN-sent-automatically;\r
+              processed/warning: you're awesome\r
+            Failure: oops-a-failure\r
+            Error: oops-an-error\r
+            Warning: oops-a-warning\r
+            Received-content-MIC: 7v7F++fQaNB1sVLFtMRp+dF+eG4=, sha1\r
+            \r
+            """;
 
     public static final String EXPECTED_REPORTING_UA = "AS2 Server";
     public static final String EXPECTED_MTN_NAME = "example.com";
diff --git 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/MicUtilsTest.java
 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/MicUtilsTest.java
index 23f67a8f4c08..6892871d9714 100644
--- 
a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/MicUtilsTest.java
+++ 
b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/util/MicUtilsTest.java
@@ -49,59 +49,61 @@ public class MicUtilsTest {
     private static final String DISPOSITION_NOTIFICATION_OPTIONS_VALUE
             = " signed-receipt-protocol   =   optional  , pkcs7-signature  ;   
 signed-receipt-micalg   =    required  ,  sha1  ";
     private static final String CONTENT_TYPE_VALUE = 
AS2MimeType.APPLICATION_EDIFACT;
-    private static final String EDI_MESSAGE = 
"UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'\n"
-                                              + 
"UNH+00000000000117+INVOIC:D:97B:UN'\n"
-                                              + "BGM+380+342459+9'\n"
-                                              + "DTM+3:20060515:102'\n"
-                                              + "RFF+ON:521052'\n"
-                                              + "NAD+BY+792820524::16++CUMMINS 
MID-RANGE ENGINE PLANT'\n"
-                                              + "NAD+SE+005435656::16++GENERAL 
WIDGET COMPANY'\n"
-                                              + "CUX+1:USD'\n"
-                                              + "LIN+1++157870:IN'\n"
-                                              + "IMD+F++:::WIDGET'\n"
-                                              + "QTY+47:1020:EA'\n"
-                                              + "ALI+US'\n"
-                                              + "MOA+203:1202.58'\n"
-                                              + "PRI+INV:1.179'\n"
-                                              + "LIN+2++157871:IN'\n"
-                                              + "IMD+F++:::DIFFERENT WIDGET'\n"
-                                              + "QTY+47:20:EA'\n"
-                                              + "ALI+JP'\n"
-                                              + "MOA+203:410'\n"
-                                              + "PRI+INV:20.5'\n"
-                                              + "UNS+S'\n"
-                                              + "MOA+39:2137.58'\n"
-                                              + "ALC+C+ABG'\n"
-                                              + "MOA+8:525'\n"
-                                              + "UNT+23+00000000000117'\n"
-                                              + "UNZ+1+00000000000778'";
-
-    private static final String EDI_MESSAGE_WITH_NON_ASCII = 
"UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'\n"
-                                                             + 
"UNH+00000000000117+INVOIC:D:97B:UN'\n"
-                                                             + 
"BGM+380+342459+9'\n"
-                                                             + 
"DTM+3:20060515:102'\n"
-                                                             + 
"RFF+ON:521052'\n"
-                                                             + 
"NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT ΠΠΠ'\n"
-                                                             + 
"NAD+SE+005435656::16++GENERAL WIDGET COMPANY óóó'\n"
-                                                             + "CUX+1:USD'\n"
-                                                             + 
"LIN+1++157870:IN'\n"
-                                                             + 
"IMD+F++:::WIDGET ΣΣΣ'\n"
-                                                             + 
"QTY+47:1020:EA'\n"
-                                                             + "ALI+US'\n"
-                                                             + 
"MOA+203:1202.58'\n"
-                                                             + 
"PRI+INV:1.179'\n"
-                                                             + 
"LIN+2++157871:IN'\n"
-                                                             + 
"IMD+F++:::DIFFERENT WIDGET ΦΦΦ'\n"
-                                                             + 
"QTY+47:20:EA'\n"
-                                                             + "ALI+JP'\n"
-                                                             + "MOA+203:410'\n"
-                                                             + 
"PRI+INV:20.5'\n"
-                                                             + "UNS+S'\n"
-                                                             + 
"MOA+39:2137.58'\n"
-                                                             + "ALC+C+ABG'\n"
-                                                             + "MOA+8:525'\n"
-                                                             + 
"UNT+23+00000000000117'\n"
-                                                             + 
"UNZ+1+00000000000778'";
+    private static final String EDI_MESSAGE = """
+            UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
+            UNH+00000000000117+INVOIC:D:97B:UN'
+            BGM+380+342459+9'
+            DTM+3:20060515:102'
+            RFF+ON:521052'
+            NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
+            NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
+            CUX+1:USD'
+            LIN+1++157870:IN'
+            IMD+F++:::WIDGET'
+            QTY+47:1020:EA'
+            ALI+US'
+            MOA+203:1202.58'
+            PRI+INV:1.179'
+            LIN+2++157871:IN'
+            IMD+F++:::DIFFERENT WIDGET'
+            QTY+47:20:EA'
+            ALI+JP'
+            MOA+203:410'
+            PRI+INV:20.5'
+            UNS+S'
+            MOA+39:2137.58'
+            ALC+C+ABG'
+            MOA+8:525'
+            UNT+23+00000000000117'
+            UNZ+1+00000000000778'""";
+
+    private static final String EDI_MESSAGE_WITH_NON_ASCII = """
+            UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
+            UNH+00000000000117+INVOIC:D:97B:UN'
+            BGM+380+342459+9'
+            DTM+3:20060515:102'
+            RFF+ON:521052'
+            NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT ΠΠΠ'
+            NAD+SE+005435656::16++GENERAL WIDGET COMPANY óóó'
+            CUX+1:USD'
+            LIN+1++157870:IN'
+            IMD+F++:::WIDGET ΣΣΣ'
+            QTY+47:1020:EA'
+            ALI+US'
+            MOA+203:1202.58'
+            PRI+INV:1.179'
+            LIN+2++157871:IN'
+            IMD+F++:::DIFFERENT WIDGET ΦΦΦ'
+            QTY+47:20:EA'
+            ALI+JP'
+            MOA+203:410'
+            PRI+INV:20.5'
+            UNS+S'
+            MOA+39:2137.58'
+            ALC+C+ABG'
+            MOA+8:525'
+            UNT+23+00000000000117'
+            UNZ+1+00000000000778'""";
 
     private static final String EXPECTED_MESSAGE_DIGEST_ALGORITHM = "sha1";
     private static final String EXPECTED_ENCODED_MESSAGE_DIGEST = 
"0mGTGdBjQtu8VQ52506Coi0xHbc=";


Reply via email to