How to mock HTTP endpoints in Mule Functional Test?

Mule is an enterprise service bus (ESB) and integration framework. In Mule, we define flows and sub-flows in order to integrate applications and orchestrate services.These flows contain endpoints to integrate different applications or services. These endpoints can be HTTP, VM, JMS, etc. More details about development in mule can be found here. Below is a sample flow.
Screen Shot 2014-03-18 at 1.12.54 PM

In order to write unit test cases for mule flows, mule provides an abstract JUnit test case called org.mule.tck.junit4.FunctionalTestCase that runs Mule inside a test case and manages the lifecycle of the server.More details about can be found here.
Read More »