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