View Javadoc

1   /*
2    * $Id: InOutOutOnlyAsyncRouterTestCase.java 20321 2010-11-24 15:21:24Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.test.integration.messaging.meps;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.module.client.MuleClient;
15  import org.mule.tck.FunctionalTestCase;
16  
17  
18  // START SNIPPET: full-class
19  public class InOutOutOnlyAsyncRouterTestCase extends FunctionalTestCase
20  {
21      public static final long TIMEOUT = 3000;
22  
23      protected String getConfigResources()
24      {
25          return "org/mule/test/integration/messaging/meps/pattern_In-Out_Out-Only-Async-Router.xml";
26      }
27  
28      public void testExchange() throws Exception
29      {
30          MuleClient client = new MuleClient(muleContext);
31  
32          MuleMessage result = client.send("inboundEndpoint", "some data", null);
33          assertNotNull(result);
34          assertEquals("got it!", result.getPayloadAsString());
35  
36          final Object foo = result.getInboundProperty("foo");
37          assertNotNull(foo);
38          assertEquals("bar", foo);
39      }
40  }
41  // END SNIPPET: full-class