BitVectorImpl implements BitVector, Iterable<Boolean> { static long setBitInWord(byte position, boolean bit, long word) { if (getBitInWord(position, word) == bit) { return word; } else { return word ^ (((long) 1) << position); } } BitVectorImpl();  BitVectorImpl(BitVector bitVector);  BitVectorImpl(long initialSize); @Override boolean addBit(boolean bit); @Override boolean equals(Object obj); @Override boolean getBit(long position); @Override int hashCode(); @Override Iterator<Boolean> iterator(); @Override void setBit(long position, boolean bit); @Override long size(); @Override String toString();  }
@Test(expected = IndexOutOfBoundsException.class) public void testInvalidPositionSizeSet00() { BitVectorImpl.setBitInWord((byte) -1, true, 0); }
@Test(expected = IndexOutOfBoundsException.class) public void testInvalidPositionSizeSet01() { BitVectorImpl.setBitInWord((byte) 0x40, false, 0); }