dataAccessSession.close(EnumFilePersistenceCloseAction.SAVE);
filePersistence.close();
}
private void assertDataAndBackupAreSame() throws FileIOException {
final IRandomAccessFile randomAccessFile = new RandomAccessFileDirectNio(
new File(dataFile), 1, 0);
final SortedMap<Integer, Integer> diffMap = new TreeMap<Integer, Integer>();
final boolean differs = randomAccessFile.differs(backupFile, diffMap);
if (differs) {
LOGGER.error("differs\n" + diffMap.toString());
}
assertFalse("file content must be same", differs);
}