FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException,
FilePersistenceTooBigForSerializationException, TestException {
IDataAccessSession dataAccessSession = filePersistence
.createDataAccessSession();
Container container = new Container();
container.stateSetup();
dataAccessSession.open();
dataAccessSession.setObject("key", container);
dataAccessSession.close(EnumFilePersistenceCloseAction.SAVE);
filePersistence.xmlExport(RUNTIME, RUNTIME + "/tmp", true);
filePersistence.close();
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
builder.setFileAccessMode(EnumFileAccessMode.MAPPED_RANDOM_FILE_ACCESS);
builder.setMaxBufferSize(8 * 1024);
builder.setMaxNumberOfBuffer(32);
builder.setPathName(TestConstant.getWinRamDiskRuntimeDir());
builder.setProxyMode(true);
builder.setRemoveFiles(true);
builder.setGarbageManagement(false);
builder.setCrashSafeMode(false);
filePersistence = builder.build();
filePersistence.xmlImport(RUNTIME, true);
dataAccessSession = filePersistence.createDataAccessSession();
dataAccessSession.open();
container = (Container) dataAccessSession.getObject("key");
assertNotNull("must have object", container);
assertTrue("bad state", container.checkState());
dataAccessSession.close(EnumFilePersistenceCloseAction.SAVE);
filePersistence.close();
}