View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.issues;
8   
9   import org.mule.api.MuleException;
10  import org.mule.api.MuleMessage;
11  import org.mule.module.client.MuleClient;
12  import org.mule.tck.junit4.FunctionalTestCase;
13  import org.mule.tck.junit4.rule.DynamicPort;
14  
15  import org.junit.Rule;
16  import org.junit.Test;
17  
18  import static org.junit.Assert.assertNull;
19  
20  public class InOutOutOnlyMessageCopyMule3007TestCase extends FunctionalTestCase
21  {
22  
23      @Rule
24      public DynamicPort dynamicPort = new DynamicPort("port1");
25  
26      @Override
27      protected String getConfigResources()
28      {
29          return "org/mule/issues/inout-outonly-message-copy-mule3007-test.xml";
30      }
31  
32      @Test
33      public void testStreamMessage() throws MuleException
34      {
35          MuleClient client = new MuleClient(muleContext);
36          String url = String.format("http://localhost:%1d/services", dynamicPort.getNumber());
37          System.out.println(url);
38          MuleMessage response = client.send(url, "test", null);
39          assertNull(response.getExceptionPayload());
40      }
41  }
42  
43