@Test
  public void testBitUtil() {
    Assert.assertTrue(BitUtil.isPowerOfTwo(32));
    Assert.assertFalse(BitUtil.isPowerOfTwo(37));
    Assert.assertTrue(BitUtil.isPowerOfTwo(4096L));
    Assert.assertFalse(BitUtil.isPowerOfTwo(4097L));
    Assert.assertEquals(BitUtil.nextHighestPowerOfTwo(62), 64);
    Assert.assertEquals(BitUtil.nextHighestPowerOfTwo(4092L), 4096);

    Assert.assertEquals(BitUtil.ntz(0x24), 2);
    Assert.assertEquals(BitUtil.ntz(0x1000), 12);
    Assert.assertEquals(BitUtil.ntz2(0x1000), 12);
    Assert.assertEquals(BitUtil.ntz3(0x1000), 12);
    Assert.assertEquals(BitUtil.pop(0x1000), 1);
    long[] words1 = new long[2];
    words1[0] = 0x4f2;
    words1[1] = 0x754;
    long[] words2 = new long[2];
    words2[0] = 0x1de6;
    words2[1] = 0xa07;
    Assert.assertEquals(BitUtil.pop_andnot(words1, words2, 0, 2), 5);
    Assert.assertEquals(BitUtil.pop_array(words1, 0, 2), 12);
    Assert.assertEquals(BitUtil.pop_intersect(words1, words2, 0, 2), 7);
    Assert.assertEquals(BitUtil.pop_union(words1, words2, 0, 2), 19);
    Assert.assertEquals(BitUtil.pop_xor(words1, words2, 0, 2), 12);
  }
Test for all the bit manipulation utils
ambry-utils/src/test/java/com/github/ambry/utils/BitUtilTest.java