@Test
public void testSetBit() {

	long word = 0;
	for (byte i = 0; i < 0x40; i++) {
		word = BitVectorImpl.setBitInWord(i, true, word);
	}
	for (byte i = 0; i < 0x40; i++) {
		Assert.assertTrue(BitVectorImpl.getBitInWord(i, word));
	}
	for (byte i = 0; i < 0x40; i++) {
		word = BitVectorImpl.setBitInWord(i, false, word);
	}
	for (byte i = 0; i < 0x40; i++) {
		Assert.assertFalse(BitVectorImpl.getBitInWord(i, word));
	}
	word = 0x0362;
	for (byte i = 0; i < 0x40; i++) {
		boolean value = BitVectorImpl.getBitInWord(i, word);
		word = BitVectorImpl.setBitInWord(i, value, word);
		Assert.assertEquals(value, BitVectorImpl.getBitInWord(i, word));
		value = !value;
		word = BitVectorImpl.setBitInWord(i, value, word);
		Assert.assertEquals(value, BitVectorImpl.getBitInWord(i, word));
		value = !value;
		word = BitVectorImpl.setBitInWord(i, value, word);
		Assert.assertEquals(value, BitVectorImpl.getBitInWord(i, word));
	}
	Assert.assertEquals(0x0362, word);
}