MathUtil { public static int divide(int p, int q, RoundingMode mode) { return IntMath.divide(p, q, mode); }  static int nextPowerOfTwo(int value); static long nextPowerOfTwo(long value); static int previousPowerOfTwo(int value); static long previousPowerOfTwo(long value); static boolean isPowerOfTwo(int value); static boolean isPowerOfTwo(long value); static int modByPowerOfTwo(int value, int mod); static int mod(int x, int m); static long mod(long x, long m); static int mod(long x, int m); static int divide(int p, int q, RoundingMode mode); static long divide(long p, long q, RoundingMode mode); static int pow(int b, int k); static long pow(long b, int k); static int sqrt(int x, RoundingMode mode); static long sqrt(long x, RoundingMode mode);  }
@Test public void divide() { assertThat(11 / 4).isEqualTo(2); assertThat(10L / 4).isEqualTo(2); assertThat(MathUtil.divide(10, 4, RoundingMode.HALF_UP)).isEqualTo(3); assertThat(MathUtil.divide(10L, 4L, RoundingMode.HALF_DOWN)).isEqualTo(2); }