View Javadoc

1   /*
2    * $Id: TransactionWithRecipientListTestCase.java 22431 2011-07-18 07:40:35Z dirk.olmes $
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.transport.vm.functional.transactions;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.api.client.MuleClient;
15  import org.mule.tck.junit4.FunctionalTestCase;
16  
17  import java.util.Map;
18  
19  import org.junit.Test;
20  
21  import static org.junit.Assert.assertEquals;
22  
23  public class TransactionWithRecipientListTestCase extends FunctionalTestCase
24  {
25  
26      @Override
27      protected String getConfigResources()
28      {
29          return "vm/transaction-with-recipient-list-config.xml";
30      }
31  
32      @Test
33      public void testRecipientListRouterUseDefinedTransaction() throws Exception
34      {
35          MuleClient client = muleContext.getClient();
36  
37          MuleMessage response = client.send("vm://input", "test", (Map) null);
38  
39          assertEquals("test Received", response.getPayloadAsString());
40      }
41  }