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.transport.quartz;
8   
9   import static org.junit.Assert.assertNotNull;
10  import org.mule.api.MuleMessage;
11  import org.mule.api.client.LocalMuleClient;
12  import org.mule.tck.junit4.FunctionalTestCase;
13  
14  import org.junit.Test;
15  
16  public class QuartzJobExceptionTestCase extends FunctionalTestCase
17  {
18  
19      @Override
20      protected String getConfigResources()
21      {
22          return "quartz-job-exception-config.xml";
23      }
24  
25      @Test
26      public void invokesFlowExceptionStrategy() throws Exception
27      {
28          LocalMuleClient client = muleContext.getClient();
29  
30          MuleMessage response = client.request("vm://error", RECEIVE_TIMEOUT);
31  
32          assertNotNull("Flow exception strategy was not invoked", response);
33      }
34  }