assertEquals(1, mda.types().length);
assertEquals("jms", mda.types()[0]);
// Create a ManagedDeployment for the root MO
Map<String, ManagedObject> unitMOs = Collections.singletonMap(JmsDestinations.class.getName(), mo);
ManagedDeploymentImpl md = new ManagedDeploymentImpl("testManagementDeploymentMO",
"testManagementDeploymentMO", DeploymentPhase.APPLICATION, null, unitMOs);
// Create ManagedComponents for the destinations
ManagedProperty destinationsMP = mo.getProperty("destinations");
assertNotNull(destinationsMP);
CollectionValue destinationsValue = (CollectionValue) destinationsMP.getValue();
assertNotNull(destinationsValue);
assertEquals(1, destinationsValue.getSize());
GenericValue q1GV = (GenericValue) destinationsValue.getElements()[0];
assertNotNull(q1GV);
ManagedObject q1MO = (ManagedObject) q1GV.getValue();
assertNotNull(q1MO);
ComponentType type = new ComponentType("JMSDestination", "queue");
RunStateMapper stateMapper = null;
ManagedComponentImpl mc = new ManagedComponentImpl(type, md, q1MO, stateMapper);
md.addComponent(q1MO.getName(), mc);
RunState state = mc.getRunState();
assertEquals(RunState.RUNNING, state);
}