1
2
3
4
5
6
7 package org.mule.test.integration.message;
8
9 import org.mule.api.MuleMessage;
10 import org.mule.module.client.MuleClient;
11 import org.mule.tck.junit4.FunctionalTestCase;
12
13 import org.junit.Test;
14
15 import static org.junit.Assert.assertEquals;
16 import static org.junit.Assert.assertNotNull;
17
18 public class MessagePropertyScopesTestCase extends FunctionalTestCase {
19
20 @Override
21 protected String getConfigResources()
22 {
23 return "org/mule/test/integration/messaging/message-property-scopes-config.xml";
24 }
25
26 @Test
27 public void testSessionProperty() throws Exception {
28
29 MuleClient client = new MuleClient(muleContext);
30 MuleMessage response = client.send("vm://in1", "Hello World", null);
31 assertNotNull(response);
32 String payload = response.getPayloadAsString();
33 assertNotNull(payload);
34 assertEquals("java.util.Date", payload);
35 }
36
37
38
39
40
41
42
43
44
45
46
47 }