FilePersistenceClassNotFoundException,
FilePersistenceInvalidClassException,
FilePersistenceDataCorruptedException,
FilePersistenceNotSerializableException,
FilePersistenceTooBigForSerializationException {
BobExternalizable bob = new BobExternalizable();
session.open();
bob.setObject(Integer.valueOf(1));
session.setObject(KEY, bob);
session.close(EnumFilePersistenceCloseAction.SAVE);
session.open();
bob = (BobExternalizable) session.getObject(KEY);
assertEquals("must be 1", Integer.valueOf(1), bob.getObject());
bob.setObject(Integer.valueOf(2));
session.close(EnumFilePersistenceCloseAction.SAVE);
session.open();
bob = (BobExternalizable) session.getObject(KEY);
assertEquals("must be 2", Integer.valueOf(2), bob.getObject());
session.close(EnumFilePersistenceCloseAction.SAVE);
}