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.client;
8   
9   import org.mule.module.client.remoting.RemoteDispatcherAgent;
10  import org.mule.tck.junit4.FunctionalTestCase;
11  import org.mule.transformer.wire.SerializedMuleMessageWireFormat;
12  
13  import org.junit.Test;
14  
15  import static org.junit.Assert.assertEquals;
16  import static org.junit.Assert.assertNotNull;
17  import static org.junit.Assert.assertTrue;
18  
19  public class RemoteDispatcherAgentConfigTestCase extends FunctionalTestCase
20  {
21      @Override
22      protected String getConfigResources()
23      {
24          return "org/mule/test/integration/client/mule-admin-agent.xml";
25      }
26  
27      @Test
28      public void testNonEmptyProperties() throws Exception
29      {
30          RemoteDispatcherAgent agent = (RemoteDispatcherAgent) muleContext.getRegistry().lookupAgent("remote-dispatcher-agent");
31          assertNotNull(agent.getEndpoint());
32          assertEquals("test://12345",agent.getEndpoint().getEndpointURI().toString());
33          assertNotNull(agent.getWireFormat());
34          assertTrue(agent.getWireFormat() instanceof SerializedMuleMessageWireFormat);
35      }
36      
37  }