### Question:
PinotDataBitSet implements Closeable { public static int getNumBitsPerValue(int maxValue) { if (maxValue <= 1) { return 1; } int numBitsPerValue = Byte.SIZE; while (maxValue > 0xFF) { maxValue >>>= Byte.SIZE; numBitsPerValue += Byte.SIZE; } return numBitsPerValue - FIRST_BIT_SET[maxValue]; } PinotDataBitSet(PinotDataBuffer dataBuffer); static int getNumBitsPerValue(int maxValue); int readInt(int index, int numBitsPerValue); void readInt(int startIndex, int numBitsPerValue, int length, int[] buffer); void writeInt(int index, int numBitsPerValue, int value); void writeInt(int startIndex, int numBitsPerValue, int length, int[] values); void setBit(int bitOffset); void unsetBit(int bitOffset); int getNextSetBitOffset(int bitOffset); int getNextNthSetBitOffset(int bitOffset, int n); @Override void close();  }### Answer:
@Test public void testGetNumBitsPerValue() { assertEquals(PinotDataBitSet.getNumBitsPerValue(0), 1); for (int i = 0; i < NUM_ITERATIONS; i++) { int maxValue = RANDOM.nextInt(Integer.MAX_VALUE) + 1; int actual = PinotDataBitSet.getNumBitsPerValue(maxValue); int expected = 0; while (maxValue > 0) { maxValue >>>= 1; expected++; } assertEquals(actual, expected); } }