BitField implements Comparable<BitField> { protected static int byteForBit(int bit) { return (bit / 7); } BitField(); void set(int bit, boolean value); void set(int bit); void unset(int bit); boolean isSet(int bit); void ser(DataOutput out); int deser(DataInput in); int deser(byte[] bytes, int start); @Override int compareTo(BitField o); void clear(); String toString();  }
@Test public void testByteForBit() throws Exception { assertEquals(0, byteForBit(0)); assertEquals(0, byteForBit(6)); assertEquals(1, byteForBit(7)); assertEquals(1, byteForBit(13)); assertEquals(2, byteForBit(14)); }