GUID guid = new GUID();
PersistenceBroker broker1 = PersistenceBrokerFactory.defaultPersistenceBroker();
broker1.beginTransaction();
Article a1 = (Article) broker1.getObjectByQuery(new QueryByIdentity(oid));
String originalName = a1.getArticleName();
a1.setArticleName(guid.toString());
// start a second transaction
PersistenceBroker broker2 = PersistenceBrokerFactory.defaultPersistenceBroker();
broker2.beginTransaction();
Article a2 = (Article) broker2.getObjectByQuery(new QueryByIdentity(oid));
assertEquals(guid.toString(), a1.getArticleName());
assertEquals(originalName, a2.getArticleName());
assertNotSame(a1, a2);
broker1.commitTransaction();
broker1.close();