The transformation (xml to json) works completely fine during normal run, but when the same flow is being tested using MUnit it fails at dataweave with error message
There are two transformers that are an exact match for input: interface org.mule.api.transport.OutputHandler, output: class java.lang.String.
Transformers are: ObjectToAtomString(class org.mule.transformer.simple.ObjectToString) and ObjectToString(class org.mule.transformer.simple.ObjectToString$$EnhancerByMUNIT$$99111c4f)
I have added the input MIME TYPE in data transformation as well.
I tried to check the tranformation in another demo project to test it using munit and it passed dataweave successfully without any error.
I have data mapper 3.7.3 jar included in the project and pom file.
We faced similar issue with DataWeave in Mule 3.8.2 version for munit, though normal run was working fine. we resolved it with below workaround: We had Byte Array to String transformer which was throwing this exception. We changed it to Byte Array to Object and in the object we gave class as java.lang.String.