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.tck.testmodels.mule;
8   
9   import org.mule.api.MuleException;
10  import org.mule.api.object.ObjectFactory;
11  import org.mule.component.DefaultJavaComponent;
12  
13  /**
14   * Makes the underlying POJO service object available for unit testing.
15   */
16  public class TestMuleProxy extends DefaultJavaComponent
17  {
18  
19      public TestMuleProxy(ObjectFactory objectFactory) throws MuleException
20      {
21          super(objectFactory);
22      }
23  
24      /** Returns the underlying POJO service object for unit testing. */
25      public Object getPojoService() throws Exception
26      {
27          return objectFactory.getInstance(muleContext);
28      }
29  }