title: Mule: JUnit test case to call a service which is in middle of the Mule flow
body: <p>I'm newbie for JUnit  test case. Please help me on this issue. I have 2 mule flows- first flow having MQ as inbound and it has datamapper to transformer the xml. With the first flow input, i'm calling second flow where we are calling the existing service ( SOAP/HTTP) call. Please  find my JUnit below. I'm able to get the success response. But my requirement 
  1. I need to see the transformer response coming out from the Transformer.( Like how we see via logger component in our flow)
  2.Need to override the url (HTTP) through JUnit ( in order to test the error scenario)</p>
  
  <pre><code>    public class Request_SuccessPath extends FunctionalTestCase {
      @Test
      public void BulkRequest () throws Exception {
          MuleClient client = muleContext.getClient();
          System.out.println("test");
          String payload = " &lt;root&gt;  &lt;messageName&gt;str1234&lt;/messageName&gt;&lt;messageId&gt;12345&lt;/messageId&gt;&lt;DS&gt;123&lt;/DS&gt;&lt;&lt;/root&gt;";
          MuleMessage reply = client.send ("vm://test",payload ,null);}
  @Override
      protected String getConfigResources() {
          // TODO Auto-generated method stub
          return "src/main/app/project.xml";}
  </code></pre>
  
  <p>i thought the following snippet will override the url.But it is not</p>
  
  <pre><code>          DefaultHttpClient client1 = new DefaultHttpClient();  
      HttpGet httpGet = new HttpGet("http://localhost:7800/service);
      assertNotNull(response);
  </code></pre>
  
  <p>3. How to take the control of the flow and see any response inbetween the flow.</p>
  
  <p>Instead of WMQ, i have replaced VM as inbound end point for testing purposes.
  4. Is there any chance like without replacing VM can we call directly with WMQ through JUnit TestCase. Kindly help me on this.
  I'm using 3.4 version, not using maven as of now. Please help me. Thanks in advance.</p>