1   /*
2    * $Id$
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.test.integration.xml;
12  
13  import org.mule.DefaultMuleMessage;
14  import org.mule.api.MuleMessage;
15  import org.mule.module.client.MuleClient;
16  import org.mule.tck.FunctionalTestCase;
17  
18  import java.io.InputStream;
19  
20  import org.w3c.dom.Document;
21  
22  public class JaxenFilterTestCase extends FunctionalTestCase
23  {
24      public void testJaxen() throws Exception
25      {
26          MuleClient client = new MuleClient();
27          InputStream po = getClass().getResourceAsStream("/org/mule/test/integration/xml/purchase-order.xml");
28          
29          assertNotNull(po);
30          
31          MuleMessage msg = new DefaultMuleMessage(po);
32          MuleMessage res = client.send("vm://in", msg);
33          
34          Object payload = res.getPayload();
35          assertTrue("payload is of type " + payload.getClass(), payload instanceof Document);
36      }
37      
38      protected String getConfigResources()
39      {
40          return "org/mule/test/integration/xml/jaxen-routing-conf.xml";
41      }
42  
43  }
44  
45