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.transformer.simple;
8   
9   import org.mule.api.transformer.Transformer;
10  import org.mule.transformer.AbstractTransformerTestCase;
11  
12  import java.io.ByteArrayInputStream;
13  
14  public class ByteArrayInputStreamTransformersTestCase extends AbstractTransformerTestCase
15  {
16  
17      public Transformer getTransformer() throws Exception
18      {
19          return new ObjectToInputStream();
20      }
21  
22      public Transformer getRoundTripTransformer() throws Exception
23      {
24          return new ObjectToByteArray();
25      }
26  
27      public Object getTestData()
28      {
29          return TEST_MESSAGE.getBytes();
30      }
31  
32      public Object getResultData()
33      {
34          return new ByteArrayInputStream(TEST_MESSAGE.getBytes());
35      }
36  
37  }