// Must use the default delegator because the deserialized GenericValue can't
// find the randomized one.
Delegator localDelegator = DelegatorFactory.getDelegator("default");
boolean transBegin = TransactionUtil.begin();
localDelegator.create("TestingType", "testingTypeId", "TEST-5", "description", "Testing Type #5");
GenericValue testValue = localDelegator.findOne("TestingType", false, "testingTypeId", "TEST-5");
assertEquals("Retrieved value has the correct description", "Testing Type #5", testValue.getString("description"));
String newValueStr = UtilXml.toXml(testValue);
GenericValue newValue = (GenericValue) UtilXml.fromXml(newValueStr);
assertEquals("Retrieved value has the correct description", "Testing Type #5", newValue.getString("description"));
newValue.put("description", "XML Testing Type #5");