View Javadoc

1   /*
2    * $Id:  $
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  package org.mule.test.integration.message;
11  
12  import org.mule.DefaultMuleMessage;
13  import org.mule.api.MuleMessage;
14  import org.mule.api.client.LocalMuleClient;
15  
16  public class VmPropertyScopeTestCase extends AbstractPropertyScopeTestCase
17  {
18      @Override
19      protected String getConfigResources()
20      {
21          return "org/mule/test/message/vm-property-scope.xml";
22      }
23  
24      public void testRequestResponseChain() throws Exception
25      {
26          LocalMuleClient client = muleContext.getClient();
27          MuleMessage message = new DefaultMuleMessage("test", muleContext);
28          message.setOutboundProperty("foo", "fooValue");
29  
30          MuleMessage result = client.send("inbound2", message);
31          assertEquals("test bar", result.getPayload());
32          assertEquals("fooValue", result.<Object>getInboundProperty("foo"));
33      }
34  }