@Test
public void testIterator() {

	RankedBitVectorImpl bv = new RankedBitVectorImpl(new BitVectorImpl());
	PseudorandomBooleanGenerator generator = new PseudorandomBooleanGenerator(
			0x7531);
	Assert.assertEquals(0, bv.size());
	for (int i = 0; i < 0x300; i++) {
		bv.addBit(generator.getPseudorandomBoolean());
	}
	Iterator<Boolean> it = bv.iterator();
	for (int i = 0; i < 0x300; i++) {
		boolean value = it.next();
		Assert.assertEquals(bv.getBit(i), value);
	}
	Assert.assertFalse(it.hasNext());
}