### Question:
Integers { public static int bitCount(int i) { i -= ((i >> 1) & 0x55555555); i = (i & 0x33333333) + ((i >> 2) & 0x33333333); i = (((i >> 4) + i) & 0x0F0F0F0F); i += (i >> 8); i += (i >> 16); return (i & 0x0000003F); }  static int decode(String string); static int parseInt(String string); static int parseInt(String string, int radix); static String toBinaryString(int i); static String toHexString(int i); static String toDecimalString(int value); static String toString(int value); static int highestOneBit(int i); static int lowestOneBit(int i); static int numberOfLeadingZeros(int i); static int numberOfTrailingZeros(int i); static int bitCount(int i); static int rotateLeft(int i, int distance); static int rotateRight(int i, int distance); static int reverseBytes(int i); static int reverse(int i); static int digit(char c, int radix); static final int MAX_VALUE; static final int MIN_VALUE; static final int MIN_RADIX; static final int MAX_RADIX; }### Answer:
@Test public void test_bitCountI() { assertEquals(0, Integers.bitCount(0x0)); assertEquals(1, Integers.bitCount(0x1)); assertEquals(1, Integers.bitCount(0x2)); assertEquals(2, Integers.bitCount(0x3)); assertEquals(1, Integers.bitCount(0x4)); assertEquals(2, Integers.bitCount(0x5)); assertEquals(2, Integers.bitCount(0x6)); assertEquals(3, Integers.bitCount(0x7)); assertEquals(1, Integers.bitCount(0x8)); assertEquals(2, Integers.bitCount(0x9)); assertEquals(2, Integers.bitCount(0xA)); assertEquals(3, Integers.bitCount(0xB)); assertEquals(2, Integers.bitCount(0xC)); assertEquals(3, Integers.bitCount(0xD)); assertEquals(3, Integers.bitCount(0xE)); assertEquals(4, Integers.bitCount(0xF)); assertEquals(8, Integers.bitCount(0xFF)); assertEquals(12, Integers.bitCount(0xFFF)); assertEquals(16, Integers.bitCount(0xFFFF)); assertEquals(20, Integers.bitCount(0xFFFFF)); assertEquals(24, Integers.bitCount(0xFFFFFF)); assertEquals(28, Integers.bitCount(0xFFFFFFF)); assertEquals(32, Integers.bitCount(0xFFFFFFFF)); }