class BitVectorIterator implements Iterator<Boolean> {

	@Override
	public Boolean next() {
		if (this.pointer >= this.bitVector.size()) {
			throw new NoSuchElementException();
		}

		return this.bitVector.getBit(this.pointer++);
	}

}

class BitVectorIteratorTest {

	@Test(expected = NoSuchElementException.class)
	public void testNoSuchElementException() {

		new BitVectorImpl().iterator().next();
	}

}