### Question:
MathUtils { public static int getNextPowerOf2(int i) { return Math.max(2, Integer.highestOneBit(i - 1) << 1); }  static int getNextPowerOf2(int i);  }### Answer:
@Test void getNextPowerOf2() { assertSoftly(softly -> { softly.assertThat(MathUtils.getNextPowerOf2(-1)).isEqualTo(2); softly.assertThat(MathUtils.getNextPowerOf2(0)).isEqualTo(2); softly.assertThat(MathUtils.getNextPowerOf2(1)).isEqualTo(2); softly.assertThat(MathUtils.getNextPowerOf2(2)).isEqualTo(2); softly.assertThat(MathUtils.getNextPowerOf2(3)).isEqualTo(4); softly.assertThat(MathUtils.getNextPowerOf2(234234)).isEqualTo(262144); }); }