1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.jms.integration;
12
13 import org.mule.api.MuleException;
14 import org.mule.api.MuleMessage;
15 import org.mule.module.client.MuleClient;
16
17 import java.util.HashMap;
18 import java.util.Map;
19
20 import org.junit.Test;
21
22 import static org.junit.Assert.assertEquals;
23
24 public class JmsCustomCorrelationIdTestCase extends AbstractJmsFunctionalTestCase
25 {
26
27 @Override
28 protected String getConfigResources()
29 {
30 return "integration/jms-custom-correlation.xml";
31 }
32
33 @Test
34 public void testExplicitReplyToAsyncSet() throws MuleException
35 {
36 MuleClient muleClient = new MuleClient(muleContext);
37 Map<String, Object> props = new HashMap<String, Object>();
38 props.put("customCorrelation", "abcdefghij");
39 MuleMessage response = muleClient.send("vm://in4", TEST_MESSAGE, props);
40
41 assertEquals(TEST_MESSAGE + " TestService1", response.getPayload());
42 }
43 }