dataManager.flush();
final ClassInfoFactory classInfoFactory = new ClassInfoFactory(1);
classInfoFactory.setConversionManager(new ConversionManager(
classInfoFactory));
final ClassNameManager classNameManager = new ClassNameManager(
recordableManager, storeHeader, classInfoFactory,
helperBinaryConversion);
classNameManager.load();
assertEquals("must be class #0", 0,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(this.getClass())));
assertTrue("store header must changed", storeHeader.isStateChanged());
recordableManager.save();
assertFalse("store header must unchanged", storeHeader.isStateChanged());
assertEquals("must be class #1", 1,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(Integer.class)));
assertTrue("store header must changed", storeHeader.isStateChanged());
recordableManager.save();
assertFalse("store header must unchanged", storeHeader.isStateChanged());
dataManager.flush();
classNameManager.clear();
classNameManager.load();
assertEquals("must be class #0", 0,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(this.getClass())));
assertEquals("must be class #1", 1,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(Integer.class)));
assertEquals("must be class #2", 2,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(String.class)));
assertEquals("must be this.getClass", this.getClass(), classNameManager
.getObjectClassInfo(0).getObjectClass());
assertEquals("must be Integer.class", Integer.class, classNameManager
.getObjectClassInfo(1).getObjectClass());
assertEquals("must be String.class", String.class, classNameManager
.getObjectClassInfo(2).getObjectClass());
assertTrue("store header must changed", storeHeader.isStateChanged());
recordableManager.save();
dataManager.flush();
classNameManager.clear();
classNameManager.load();
assertEquals("must be class #0", 0,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(this.getClass())));
assertEquals("must be class #1", 1,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(Integer.class)));
assertEquals("must be class #2", 2,
classNameManager.getIdentifier(classInfoFactory
.getNoProxyClassInfo(String.class)));
assertEquals("must be this.getClass", this.getClass(), classNameManager
.getObjectClassInfo(0).getObjectClass());
assertEquals("must be Integer.class", Integer.class, classNameManager
.getObjectClassInfo(1).getObjectClass());
assertEquals("must be String.class", String.class, classNameManager
.getObjectClassInfo(2).getObjectClass());
}