For a REST API in Mule which returns a JSON response, it is always advisable to write MUnit tests and assert the entire JSON response payload to avoid contract conflicts/mismatches. MUnit does not have any out-of-the-box component to compare two JSON files. In this example, we are using a Groovy script for this comparison/assertion.
Objective
Our objective is loading expected JSON data from a file and comparing it with actual MUnit payload which we got from the tested flow. https://goo.gl/BBAbcB #DataIntegration #ML

