ConnectorDeployable deployable = new ConnectorDeployable(bundle);
assertEquals(ModuleType.RAR, deployable.getType());
Set entrySet = new HashSet(Collections.list(deployable.entries()));
assertTrue(entrySet.contains("META-INF/ra.xml"));
assertTrue(entrySet.contains("activemq-ra-3.2.1.jar"));
DDBeanRoot root = deployable.getDDBeanRoot();
assertNotNull(root);
assertEquals(ModuleType.RAR, root.getType());
assertEquals(deployable, root.getDeployableObject());
// Create the DConfigBeanRoot
Connector15DCBRoot dcbRoot = new Connector15DCBRoot(root);
RARConfiguration configuration = new RARConfiguration(deployable, dcbRoot);
configuration.restore(in);
// Try the /connector element
ConnectorDCB connector = (ConnectorDCB) dcbRoot.getDConfigBean(root.getChildBean(dcbRoot.getXpaths()[0])[0]);
assertNotNull(connector);
// Try the /connector/resourceadapter element
assertNotNull(connector.getResourceAdapter());
assertEquals(1, connector.getResourceAdapter().length);
ResourceAdapter adapter = connector.getResourceAdapter()[0];