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.module.rss;
8   
9   import org.mule.api.transformer.Transformer;
10  import org.mule.tck.junit4.AbstractMuleContextTestCase;
11  import org.mule.transformer.types.DataTypeFactory;
12  
13  import com.sun.syndication.feed.synd.SyndFeed;
14  
15  import java.io.DataInputStream;
16  
17  import org.junit.Test;
18  
19  import static org.junit.Assert.assertNotNull;
20  
21  public class TransformerDiscoveryTestCase extends AbstractMuleContextTestCase
22  {
23      @Test
24      public void testLookup() throws Exception
25      {
26          Transformer t = muleContext.getRegistry().lookupTransformer(DataTypeFactory.create(DataInputStream.class), DataTypeFactory.create(SyndFeed.class));
27          assertNotNull(t);
28          t = muleContext.getRegistry().lookupTransformer(DataTypeFactory.create(DataInputStream.class), DataTypeFactory.create(SyndFeed.class));
29          assertNotNull(t);
30      }
31  }