StoreTooBigForSerializationException {
/*
* creation of object graph
*/
BobContainer bobContainer = new BobContainer();
Bob1 bob1 = new Bob1();
bobContainer.setObject1(bob1);
Bob2 bob2 = new Bob2();
bob1.setBob2(bob2);
store.setRoot(bobContainer);
logger.debug("initial save");
store.save(false, false);
logAllDataIdentifier();
Map<DataRecordIdentifier, String> map = objectClassMap(new DataRecordIdentifier[] {});
objectIoManager.clearObjectState();
final String links1 = links(map);
/*
* assert garbage information after initial creation
*/
String expectedLinks = sortString(
/**/"StoreRoot4 -> BobContainer\n" +
/**/"Bob1 -> Bob2\n" +
/**/"BobContainer -> Bob1\n");
assertEquals("not expected link", expectedLinks, links1);
/* number of to garbage */
int numberToGarbage = toGarbageRecordManager.getNumberOfToGarbage();
assertEquals("must not have object to garbage", 0, numberToGarbage);
/* number of garbage candidate */
int numberOfGarbageCandidate = garbageCandidateRecordManager
.getNumberOfGarbageCandidate();
assertEquals(MUST_NOT_HAVE_OBJECT_MARKED_GARBAGE_CANDIDATE, 0,
numberOfGarbageCandidate);
/* number of class name definition */
final int initialNumberOfClassDef = classNameManager
.getNumberOfClassDef();
/* number of to visit */
int numberOfToVisit = toVisitRecordManager.getNumberOfToVisit();
assertEquals(0, numberOfToVisit);
/* number of visited */
int numberOfVisited = visitedRecordManager.getNumberOfVisited();
assertEquals(0, numberOfVisited);
/* all data record */
final int initialNumberOfDataRecord = dataManager
.getNumberOfDataRecord();
/*
* read, check data record identifier, detach object, save
*/
bobContainer = (BobContainer) store.readAndGetRoot();
final DataRecordIdentifier idBobContainer = store
.getDataRecordIdentifierAssociatedToObject(bobContainer);
logger.debug("id bob container " + idBobContainer);
assertNotNull("bobContainer must have associated data record",
idBobContainer);
bob1 = (Bob1) bobContainer.getObject1();
final DataRecordIdentifier idBob1 = store
.getDataRecordIdentifierAssociatedToObject(bob1);
logger.debug("id bob1 " + idBob1);
assertNotNull("bob1 must have associated data record", idBob1);
bob2 = bob1.getBob2();
final DataRecordIdentifier idBob2 = store
.getDataRecordIdentifierAssociatedToObject(bob2);
logger.debug("id bob2 " + idBob2);
assertNotNull("bob2 must have associated data record", idBob2);