mayurbm commented on PR #25555:
URL: https://github.com/apache/camel/pull/25555#issuecomment-5435860821

   ### Additional tests for `CamelXmlJaxpBulkConverterLoader` registry path
   
   Added two tests to `camel-core/XmlConverterTest` that exercise the **bulk 
loader path** (`CamelXmlJaxpBulkConverterLoader`) via 
`context.getTypeConverter().convertTo(Document.class, ...)` — the real 
production path (e.g. CXF → `MessageSupport.getBody()` → type converter 
registry).
   
   The existing tests in `XmlConverterPrologTest` call 
`converter.toDOMDocument(bytes, null)` directly. The bulk loader path is 
different: when `@Converter(allowNull = true)` returns `null`, the loader 
returns `Void.class` which the registry translates to `null` for the caller.
   
   **New tests:**
   - `testToDOMDocumentReturnsNullForNonXmlByteArrayViaRegistry` — JSON 
`byte[]` returns `null` via registry (not an exception)
   - `testToDOMDocumentParsesValidXmlByteArrayViaRegistry` — valid XML `byte[]` 
still produces a `Document` via registry
   
   **Local validation:**
   - `mvn formatter:format impsort:sort` — no changes needed
   - `XmlConverterTest`: Tests run: 51, Failures: 0 (49 existing + 2 new)
   - `XmlConverterPrologTest`: Tests run: 21, Failures: 0


-- 
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