1   /*
2    * $Id: GroovyBindingFunctionalTestCase.java 12075 2008-06-17 11:12:10Z rossmason $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.module.scripting;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.module.client.MuleClient;
15  import org.mule.tck.FunctionalTestCase;
16  
17  
18  public class GroovyBindingFunctionalTestCase extends FunctionalTestCase
19  {
20      //@Override
21      protected String getConfigResources()
22      {
23          return "groovy-binding-config.xml";
24      }
25  
26      public void testBindingCallout() throws Exception
27      {
28          MuleClient client = new MuleClient();
29          client.dispatch("client_request", "Important Message", null);
30          MuleMessage response = client.request("client_response", 2000);
31          assertNotNull(response);
32          assertEquals("Important Message Received by Callout1 Received by Callout2", response.getPayloadAsString());
33      }
34  
35  
36  }