ObjectIODataRecordNotFoundException, StoreInvalidClassException,
StoreNotSerializableException, StoreClassNotFoundException,
StoreDataCorruptedException, ObjectIOClassNotFoundException,
ObjectIODataCorruptedException, HeapException,
StoreTooBigForSerializationException {
BobContainer bobContainer = new BobContainer();
store.setRoot(bobContainer);
store.save(true, false);
DATA_MANAGER_INTEGRITY_CHECKER.checkIntegrity(dataManager);
bobContainer = (BobContainer) store.readAndGetRoot();
DataRecordIdentifier idc = store
.getDataRecordIdentifierAssociatedToObject(bobContainer);
assertNotNull(BOB_CONTAINER_MUST_HAVE_DATA_RECORD_IDENTIFIER, idc);
assertObjectLink(BobContainer.class, idc, new DataRecordIdentifier[] {});
Bob1 bob1 = new Bob1();
bobContainer.setObject1(bob1);
store.save(true, false);
bobContainer = (BobContainer) store.readAndGetRoot();
idc = store.getDataRecordIdentifierAssociatedToObject(bobContainer);
assertNotNull(BOB_CONTAINER_MUST_HAVE_DATA_RECORD_IDENTIFIER, idc);
bob1 = (Bob1) bobContainer.getObject1();
assertNotNull("bobContainer must reference bob1", bob1);
DataRecordIdentifier id1 = store
.getDataRecordIdentifierAssociatedToObject(bob1);
assertNotNull(BOB1_MUST_HAVE_DATA_RECORD_IDENTIFIER, id1);
assertObjectLink(BobContainer.class, idc,
new DataRecordIdentifier[] { id1 });
bobContainer.setObject2(bob1);
store.save(true, false);
DATA_MANAGER_INTEGRITY_CHECKER.checkIntegrity(dataManager);
bobContainer = (BobContainer) store.readAndGetRoot();
idc = store.getDataRecordIdentifierAssociatedToObject(bobContainer);
assertNotNull(BOB_CONTAINER_MUST_HAVE_DATA_RECORD_IDENTIFIER, idc);
bob1 = (Bob1) bobContainer.getObject1();
id1 = store.getDataRecordIdentifierAssociatedToObject(bob1);
assertNotNull(BOB1_MUST_HAVE_DATA_RECORD_IDENTIFIER, id1);
final Bob1 bob1Bis = (Bob1) bobContainer.getObject2();
assertSame("bob1 must be uniq", bob1, bob1Bis);
assertObjectLink(BobContainer.class, idc, new DataRecordIdentifier[] {
id1, id1 });