View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
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  import org.mule.tck.NonSerializableObject;
13  
14  import org.junit.Test;
15  
16  import static org.junit.Assert.assertNotNull;
17  import static org.junit.Assert.assertTrue;
18  
19  /**
20   * @see EE-2307
21   *
22   * Non serializable session properties won't be serialized with the mule session
23   * but neither it will be lost in the flow were it was stored
24   */
25  public class SessionPropertyChainingRouterTestCase extends FunctionalTestCase
26  {
27  
28      @Override
29      protected String getConfigResources()
30      {
31          return "org/mule/test/integration/messaging/session-property-chaining-router.xml";
32      }
33  
34      @Test
35      public void testRouter() throws Exception
36      {
37          MuleClient client = new MuleClient(muleContext);
38          MuleMessage response = client.send("vm://in", "test message", null);
39          assertNotNull(response);
40          assertTrue("Response is " + response.getPayload(), response.getPayload() instanceof NonSerializableObject);
41      }
42  }
43  
44