public static int computeMinGEPower2(int num) {
        num -= 1;
        num |= (num >>> 1);
        num |= (num >>> 2);
        num |= (num >>> 4);
        num |= (num >>> 8);
        num |= (num >>> 16);
        return num < 0 ? 1 : num + 1;
    }
@Test
    public void testComputeMinGEPower2() {
        Assert.assertEquals(1, Utils.computeMinGEPower2(0));

        for (int i = 1; i < 10000; i++) {
            int out = Utils.computeMinGEPower2(i);
            // The number i belongs to the range (out/2, out].
            Assert.assertTrue(out >= i);
            Assert.assertTrue(out / 2 < i);
        }
    }