@Test
public void testCountBits() {

	final long aLargeNumber = 0x100000;
	PseudorandomBooleanGenerator generator = new PseudorandomBooleanGenerator(
			0x1234);
	RankedBitVectorImpl bv = new RankedBitVectorImpl(new BitVectorImpl());
	for (int i = 0; i < aLargeNumber; i++) {
		boolean value = generator.getPseudorandomBoolean();
		bv.addBit(value);
	}
	for (int i = 0; i < aLargeNumber; i++) {
		if ((i % 0x6785) == 0) {
			assertCorrectCount(bv, i);
		}
	}
}