positionRecordMap.put(physicalPosition.clusterPosition, record);
}
Iterator<OClusterPosition> positionIterator = positionRecordMap.keySet().iterator();
while (positionIterator.hasNext()) {
OClusterPosition clusterPosition = positionIterator.next();
if (mersenneTwisterFast.nextBoolean()) {
Assert.assertTrue(paginatedCluster.deleteRecord(clusterPosition));
positionIterator.remove();
}
}
OPhysicalPosition physicalPosition = new OPhysicalPosition();
physicalPosition.clusterPosition = OClusterPositionFactory.INSTANCE.valueOf(Long.MAX_VALUE);
OPhysicalPosition[] positions = paginatedCluster.floorPositions(physicalPosition);
Assert.assertTrue(positions.length > 0);
positionIterator = positionRecordMap.descendingKeySet().iterator();
int counter = 0;
while (positionIterator.hasNext()) {
Assert.assertTrue(positions.length > 0);
OClusterPosition testedPosition = positionIterator.next();
Assert.assertEquals(positions[positions.length - 1].clusterPosition, testedPosition);
OPhysicalPosition positionToFind = positions[positions.length - 1];
positions = paginatedCluster.lowerPositions(positionToFind);