1
2
3
4
5
6
7
8
9
10 package org.mule.transport.jms.integration;
11
12 import org.hamcrest.core.Is;
13 import org.hamcrest.core.IsNull;
14 import org.junit.Test;
15 import org.mule.api.MuleMessage;
16 import org.mule.module.client.MuleClient;
17 import org.mule.transport.NullPayload;
18
19 import static org.junit.Assert.assertThat;
20
21 public class JmsRequestReplyTestCase extends AbstractJmsFunctionalTestCase {
22
23 @Override
24 protected String getConfigResources() {
25 return "integration/jms-request-reply-config.xml";
26 }
27
28
29 @Test
30 public void testJmsWithRequestReply() throws Exception
31 {
32 MuleMessage result = getClient().send("vm://in4jms", "some data", null);
33 assertThat(result, IsNull.<Object>notNullValue());
34 assertThat(result.getExceptionPayload(), IsNull.<Object>nullValue());
35 assertThat(result.getPayload() instanceof NullPayload, Is.is(false));
36 assertThat(result.getPayloadAsString(), Is.is("HELLO"));
37 }
38
39 }