DeploymentConfiguration rarConfiguration = new RARConfigurer().createConfiguration(deployable);
DConfigBeanRoot root = rarConfiguration.getDConfigBeanRoot(ddroot);
assertNotNull(root);
//resource adapter
DDBean resourceAdapterdd = ddroot.getChildBean(root.getXpaths()[0])[0];
ResourceAdapterDConfigBean resourceAdapterDConfigBean = (ResourceAdapterDConfigBean) root.getDConfigBean(resourceAdapterdd);
assertNotNull(resourceAdapterDConfigBean);
resourceAdapterDConfigBean.setResourceAdapterName("TestRAName");
DDBean[] resourceAdapterProperties = resourceAdapterdd.getChildBean(resourceAdapterDConfigBean.getXpaths()[0]);
assertEquals(1, resourceAdapterProperties.length);
ConfigPropertySettingDConfigBean resourceAdapterSetting = (ConfigPropertySettingDConfigBean)resourceAdapterDConfigBean.getDConfigBean(resourceAdapterProperties[0]);
assertNotNull(resourceAdapterSetting);
assertEquals("StringValue", resourceAdapterSetting.getConfigPropertyValue());
resourceAdapterSetting.setConfigPropertyValue("TestRAValue");
// //admin objects
// DDBean[] adminObjectdds = resourceAdapterdd.getChildBean(resourceAdapterDConfigBean.getXpaths()[2]);
// assertEquals(1, adminObjectdds.length);
// AdminObjectDConfigBean adminObjectDConfigBean = (AdminObjectDConfigBean)resourceAdapterDConfigBean.getDConfigBean(adminObjectdds[0]);
// assertNotNull(adminObjectDConfigBean);
// AdminObjectInstance adminObjectInstance1 = new AdminObjectInstance();
// adminObjectDConfigBean.setAdminObjectInstance(new AdminObjectInstance[] {adminObjectInstance1});
// ConfigPropertySettings adminObjectSetting1 = adminObjectInstance1.getConfigProperty()[0];
// adminObjectSetting1.setConfigPropertyValue("TestAOValue1");
//
// //add a second admin object in first position
// AdminObjectInstance adminObjectInstance2 = new AdminObjectInstance();
// adminObjectDConfigBean.setAdminObjectInstance(new AdminObjectInstance[] {adminObjectInstance2, adminObjectInstance1});
// ConfigPropertySettings adminObjectSetting2 = adminObjectInstance2.getConfigProperty()[0];
// adminObjectSetting2.setConfigPropertyValue("TestAOValue2");
//outbound
DDBean[] connectionDefinitiondds = resourceAdapterdd.getChildBean(resourceAdapterDConfigBean.getXpaths()[1]);
assertEquals(2, connectionDefinitiondds.length);
ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean = (ConnectionDefinitionDConfigBean)resourceAdapterDConfigBean.getDConfigBean(connectionDefinitiondds[0]);
assertNotNull(connectionDefinitionDConfigBean);
ConnectionDefinitionInstance connectionDefinitionInstance1 = new ConnectionDefinitionInstance();
connectionDefinitionDConfigBean.setConnectionDefinitionInstance(new ConnectionDefinitionInstance[] {connectionDefinitionInstance1});