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.exceptions;
8   
9   import org.mule.DefaultMuleMessage;
10  import org.mule.api.MuleMessage;
11  import org.mule.module.client.MuleClient;
12  import org.mule.tck.junit4.FunctionalTestCase;
13  
14  import org.junit.Test;
15  
16  import static org.junit.Assert.assertNotNull;
17  
18  public class MessageContextTestCase extends FunctionalTestCase 
19  {
20  
21      @Override
22      protected String getConfigResources() 
23      {
24          return "org/mule/test/integration/exceptions/message-context-test.xml";
25      }
26  
27      /**
28       * Test for MULE-4361
29       */
30      @Test
31      public void testAlternateExceptionStrategy() throws Exception
32      {
33          MuleClient client = new MuleClient(muleContext);
34          DefaultMuleMessage msg = new DefaultMuleMessage("Hello World", client.getMuleContext());
35          MuleMessage response = client.send("testin", msg, 200000);
36          assertNotNull(response);
37      }
38  }