.getNoProxyClassInfo(Bob1.class);
// FIXMELUC ___must use objectStateMap as factory
// final ObjectAndPersistInfo objectAndItsClassInfo = new
// ObjectAndPersistInfo(
// bob1, false, bob1ClassInfo, new StorageInfo(0));
final ObjectAndPersistInfo objectAndItsClassInfo = objectStateMap
.createObjectAndPersistInfoOfObject(bob1, false, bob1ClassInfo);
objectAndItsClassInfo.setObjectStateMap(objectStateMap);
final DataRecordIdentifier identifier = objectIOManager
.getOrCreateDataRecordIdentifierAssociatedToObject(objectAndItsClassInfo);
objectIOManager.prepareWrite(objectAndItsClassInfo);
objectIOManager.write(objectAndItsClassInfo);
// removedFromCandidateIdentifier = null;// NOPMD
final ClassInfo classInfo = classInfoFactory
.getNoProxyClassInfo(Bob1.class);
final StorageInfo storageInfo = new StorageInfo();
storageInfo
.setHeaderDataSize(AbstractObjectIOManagerIOForObject.HEADER_DATA_SIZE);
objectIOManager
.clearObjectAndPersistInfoByDataRecordIdentifier(identifier);
final ObjectAndPersistInfo proxyObjectAndItsClassInfo = proxyManager2
.newInstanceNoConstruction(classInfo, storageInfo,
objectIOManager, identifier, true);
assertEquals("must load right value", 10,
((Bob1) proxyObjectAndItsClassInfo.getObject()).getVal());
// no more remove from garbage at load, was a bug, removed from garbage
// at creation
// assertEquals("must remove from garbage", identifier,
// removedFromCandidateIdentifier);
}