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.test.integration.transformer;
8   
9   import static org.junit.Assert.assertEquals;
10  import static org.junit.Assert.assertFalse;
11  import org.mule.api.MuleMessage;
12  import org.mule.api.MuleMessageCollection;
13  import org.mule.api.client.LocalMuleClient;
14  import org.mule.tck.junit4.FunctionalTestCase;
15  
16  import java.util.LinkedList;
17  import java.util.List;
18  
19  import org.junit.Test;
20  
21  public class TransformerOnMessageCollectionTestCase extends FunctionalTestCase
22  {
23  
24      @Override
25      protected String getConfigResources()
26      {
27          return "org/mule/test/transformers/transformer-on-message-collection-config.xml";
28      }
29  
30      @Test
31      public void testIssue() throws Exception
32      {
33          LocalMuleClient client = muleContext.getClient();
34          List<String> values = new LinkedList<String>();
35          values.add("One");
36          values.add("Two");
37  
38          MuleMessage response = client.send("vm://testInput", values, null);
39          assertEquals("foo", response.getPayload());
40          assertFalse(response instanceof MuleMessageCollection);
41      }
42  }