1   /*
2    * $Id: ManagementStartupTestCase.java 11236 2008-03-06 23:48:23Z tcarlson $
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.management;
12  
13  import org.mule.api.MuleException;
14  import org.mule.module.management.agent.JmxAgent;
15  import org.mule.tck.FunctionalTestCase;
16  
17  public class ManagementStartupTestCase extends FunctionalTestCase
18  {
19  
20      protected String getConfigResources()
21      {
22          return "org/mule/test/integration/management/management-startup-test.xml";
23      }
24  
25      public void testAgentConfiguration() throws MuleException
26      {
27          JmxAgent agent = (JmxAgent)muleContext.getRegistry().lookupAgent("jmx-server");
28          assertNotNull(agent);
29          assertNotNull(agent.getConnectorServerUrl());
30          assertEquals("service:jmx:rmi:///jndi/rmi://0.0.0.0:1100/server", agent.getConnectorServerUrl());
31          assertNotNull(agent.getConnectorServerProperties());
32          assertEquals("true", agent.getConnectorServerProperties().get("jmx.remote.jndi.rebind"));
33      }
34  
35  }