gnodet opened a new pull request, #31108:
URL: https://github.com/apache/camel/pull/31108

   ## Summary
   
   Cleanup the AS2 component test classes to eliminate copy-pasted boilerplate 
and improve maintainability.
   
   ## Changes
   
   ### AS2ClientManagerIT (1041 → 851 lines, -190 lines)
   
   - Extract `verifyMdnResponse(HttpResponse, HttpRequest)` — the 8-assertion 
MDN response header block was copy-pasted in `plainMessageSend`, 
`plainMessageSend2`, and `envelopedMessageSend`
   - Extract 
`verifyDispositionNotificationReport(DispositionNotificationMultipartReportEntity,
 HttpRequest)` — the 10-assertion report structure block was copy-pasted in 5 
test methods
   - Rename `verifyMessage()` → `verifyEdiMessage()` for clarity
   - Remove `@SuppressWarnings("unused")` on `httpContext` in `asyncMDNTest` by 
eliminating the unused variable (the `HttpCoreContext` return value is simply 
discarded)
   - Remove `@SuppressWarnings("unused")` on `body` in route builder processor 
by calling `message.getBody(String.class)` without assignment
   - Remove redundant `// parameter type is ...` comments in header map 
construction
   
   ### AS2ServerManagerIT (643 → 528 lines, -115 lines)
   
   - Use existing base class `verifyMock(mockEndpoint)` instead of inlining the 
identical 3-line MockEndpoint setup in `receivePlainEDIMessage`, 
`receivePlainEDIMessageWithAttachedFileName`, `receiveMultipartSignedMessage`, 
`receiveMultipartSignedXMLMessage`, `receiveMultipartInvalidSignedMessage`
   - Use existing base class `verifyRequest(request)` instead of inlining the 
identical 12-assertion HTTP request header block in those same 5 methods
   - Remove unused `hackerissueCert` variable in 
`receiveMultipartInvalidSignedMessageTest`
   
   No test logic was changed — only refactored to use shared helpers that 
already existed in `AS2ServerManagerITBase.java`.
   
   Resolves CAMEL-19635
   
   ---
   _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to