PersistedManagedObject restoredElement = restore(mo);
assertNotNull(restoredElement);
// The objectName
PersistedProperty pp = restoredElement.getProperties().get(1);
assertNotNull(pp);
PersistedCompositeValue pcv = (PersistedCompositeValue) pp.getValue();
assertNotNull(pcv);
PersistedSimpleValue psv = (PersistedSimpleValue) pcv.getValues().get(0);
assertEquals("domain", psv.getName());
assertEquals("org.jboss", psv.getValue());
PersistedPropertiesValue ppv = (PersistedPropertiesValue) pcv.getValues().get(1);
assertEquals("keyPropertyList", ppv.getName());
assertEquals(2, ppv.getEntries().size());
// The other object name
PersistedProperty po = restoredElement.getProperties().get(0);
assertNotNull(po);
assertTrue(po.getValue() instanceof PersistedSimpleValue);
//
ManagedObject restored = update(new ObjectNameMetaData(), restoredElement);
assertNotNull(restored);
ObjectNameMetaData metaData = (ObjectNameMetaData) restored.getAttachment();