ManagementObjectExplicit explicit = new ManagementObjectExplicit();
explicit.setProperty1("value1-orig");
ManagedObject managedObject = super.initManagedObject(explicit);
DeploymentTemplateInfoFactory factory = new DeploymentTemplateInfoFactory();
DeploymentTemplateInfo info1 = factory.createTemplateInfo(managedObject, "testExplicit", "testExplicit");
log.info(info1);
assertEquals("testExplicit", info1.getName());
assertEquals("testExplicit", info1.getDescription());
assertTrue("property1 is in template info", info1.getProperties().containsKey("property1"));
ManagedProperty property1 = managedObject.getProperty("property1");
DeploymentTemplateInfo info1_1 = info1.copy();
log.info(info1);
assertEquals("testExplicit", info1.getName());
assertEquals("testExplicit", info1.getDescription());
assertTrue("property1 is in template info", info1.getProperties().containsKey("property1"));
Map<String, ManagedProperty> props1 = info1.getProperties();
ManagedProperty iproperty1 = props1.get("property1");
assertNotNull(iproperty1);
iproperty1.setValue(SimpleValueSupport.wrap("value1-copy"));
Map<String, ManagedProperty> props1_1 = info1_1.getProperties();
assertTrue("info1.props != info1_1.props", props1 != props1_1);
assertEquals("props size", props1.size(), props1_1.size());
ManagedProperty iproperty1_1 = props1_1.get("property1");
assertNotNull("info1.copy property1", iproperty1_1);
assertTrue("property1 != property1_1", iproperty1 != iproperty1_1);