/*
* $Id: InOutOutInTestCase.java 20321 2010-11-24 15:21:24Z dfeist $
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.test.integration.messaging.meps;
import org.mule.api.MuleMessage;
import org.mule.module.client.MuleClient;
import org.mule.tck.FunctionalTestCase;
import java.util.HashMap;
import java.util.Map;
// START SNIPPET: full-class
public class InOutOutInTestCase extends FunctionalTestCase
{
public static final long TIMEOUT = 3000;
protected String getConfigResources()
{
return "org/mule/test/integration/messaging/meps/pattern_In-Out_Out-In.xml";
}
public void testExchange() throws Exception
{
MuleClient client = new MuleClient(muleContext);
Map props = new HashMap();
props.put("foo", "bar");
MuleMessage result = client.send("inboundEndpoint", "some data", props);
assertNotNull(result);
assertEquals("bar header received", result.getPayload());
}
}
// END SNIPPET: full-class