@Test
public void testBitClear() throws IOException
{
int size = Integer.MAX_VALUE / 4000;
OffHeapBitSet bitset = new OffHeapBitSet(size);
List<Integer> randomBits = Lists.newArrayList();
for (int i = 0; i < 10; i++)
randomBits.add(random.nextInt(size));
for (long randomBit : randomBits)
bitset.set(randomBit);
for (long randomBit : randomBits)
Assert.assertEquals(true, bitset.get(randomBit));
for (long randomBit : randomBits)
bitset.clear(randomBit);
for (long randomBit : randomBits)
Assert.assertEquals(false, bitset.get(randomBit));
bitset.close();
}