@Test public void isBitSet() { assertTrue(BitwiseUtil.isBitSet((byte) 0b01, 0)); assertTrue(BitwiseUtil.isBitSet((byte) 0b10, 1)); assertFalse(BitwiseUtil.isBitSet((byte) 0b11111110, 0)); assertFalse(BitwiseUtil.isBitSet((byte) 0b11111101, 1)); assertFalse(BitwiseUtil.isBitSet((byte) 0xFF, 8)); }
static boolean isBitSet(byte value, int bitIndex) { return ((value & (1 << bitIndex)) & 0xFF) != 0; }
BitwiseUtil { static boolean isBitSet(byte value, int bitIndex) { return ((value & (1 << bitIndex)) & 0xFF) != 0; } }
BitwiseUtil { static boolean isBitSet(byte value, int bitIndex) { return ((value & (1 << bitIndex)) & 0xFF) != 0; }  }
BitwiseUtil { static boolean isBitSet(byte value, int bitIndex) { return ((value & (1 << bitIndex)) & 0xFF) != 0; }   }
BitwiseUtil { static boolean isBitSet(byte value, int bitIndex) { return ((value & (1 << bitIndex)) & 0xFF) != 0; }    }