paginatedCluster.truncate();
}
public void testDeleteRecordAndAddNewOnItsPlace() throws IOException {
byte[] smallRecord = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
ORecordVersion recordVersion = OVersionFactory.instance().createVersion();
recordVersion.increment();
recordVersion.increment();
OPhysicalPosition physicalPosition = paginatedCluster.createRecord(smallRecord, recordVersion, (byte) 1);
Assert.assertEquals(physicalPosition.clusterPosition, OClusterPositionFactory.INSTANCE.valueOf(0));
paginatedCluster.deleteRecord(physicalPosition.clusterPosition);
physicalPosition = paginatedCluster.createRecord(smallRecord, recordVersion, (byte) 1);
Assert.assertEquals(physicalPosition.clusterPosition, OClusterPositionFactory.INSTANCE.valueOf(1));
recordVersion.increment();
Assert.assertEquals(physicalPosition.recordVersion, recordVersion);
}