### Question:
BitUtils { public static int binLength(int n) { int len = 1; while (n >> len > 0) { len += 1; } return len; }  static boolean isPowerOf2(int n); static int binLength(int n);  }### Answer:
@Test public void binLength() { assertTrue(BitUtils.binLength(10) == 4); assertTrue(BitUtils.binLength(0) == 1); assertTrue(BitUtils.binLength(2) == 2); assertTrue(BitUtils.binLength(8) == 4); }