DataRow row = new DataRow(10);
row.put("ARTIST_ID", new Integer(1));
row.put("ARTIST_NAME", "ArtistXYZ");
row.put("DATE_OF_BIRTH", new Date());
DataObject object = context.objectFromDataRow(Artist.class, row);
ObjectId oid = object.getObjectId();
// insert object into the ObjectStore
context.getObjectStore().registerNode(oid, object);
assertSame(object, context.getObjectStore().getNode(oid));
assertNotNull(context.getObjectStore().getCachedSnapshot(oid));
context.getObjectStore().objectsUnregistered(Collections.singletonList(object));
assertNull(object.getObjectId());
assertNull(context.getObjectStore().getNode(oid));
// in the future this may not be the case
assertNull(context.getObjectStore().getCachedSnapshot(oid));
}