Tag Archives: unit-testing

Comparing XML with XMLUnit and Character Encoding

By | September 18, 2013

XMLUnit is an excellent library for comparing XML when you want to go beyond mere string comparison and, for instance, disregard whitespace or other aspects of the XML fragments that are compared. In my current area of interest, systems integration, the fact that two XML fragments convey the same information is not always enough. In… Read More »

Unit-testing Mule transformers which access session and/or invocation scopes

By | July 4, 2013

Problem When attempting to unit-test a Mule transformer that need access to session- or invocation-scoped message properties, I found the result to be an IllegalStateException that told me: Detected an attempt to set an invocation or session property, but a MuleEvent hasn’t been created using this message yet. I managed to trace the problem to… Read More »