FilePersistenceTooBigForSerializationException {
IFilePersistence filePersistence = createFilePersistence(true);
IDataAccessSession session = filePersistence.createDataAccessSession();
session.open();
Item item = new Item(0, "value");
session.setObject("key", item);
session.closeAndWait(EnumFilePersistenceCloseAction.SAVE);
filePersistence.close();
filePersistence = createFilePersistence(false);
session = filePersistence.createDataAccessSession();
session.open();
item = (Item) session.getObject("key");
assertEquals("bad state", 0, item.getIdentifier());
assertEquals("bad state", "value", item.getValue());
session.closeAndWait(EnumFilePersistenceCloseAction.SAVE);
filePersistence.close();
}