View Javadoc

1   /*
2    * $Id: TransformersMule2669TestCase.java 20321 2010-11-24 15:21:24Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.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.example.loanbroker.issues;
12  
13  import org.mule.api.MuleException;
14  import org.mule.api.MuleMessage;
15  import org.mule.example.loanbroker.bank.Bank;
16  import org.mule.example.loanbroker.messages.LoanBrokerQuoteRequest;
17  import org.mule.module.client.MuleClient;
18  import org.mule.tck.FunctionalTestCase;
19  
20  public class TransformersMule2669TestCase extends FunctionalTestCase
21  {
22  
23      protected String getConfigResources()
24      {
25          return "transformers-mule-2669.xml";
26      }
27  
28      public void testTransformers() throws MuleException
29      {
30          MuleClient client = new MuleClient(muleContext);
31          LoanBrokerQuoteRequest request = new LoanBrokerQuoteRequest();
32          request.setLenders(new Bank[0]);
33          MuleMessage response = client.send("jms://in?connector=default", request, null);
34          assertNotNull(response);
35          logger.debug(response);
36          assertNull(response.getExceptionPayload());
37          assertTrue(response.getInboundPropertyNames().contains("recipients"));
38      }
39  
40  }