### Question:
MathUtils { public static double pow2(double value) { return value * value; } private  MathUtils(); static double pow2(double value); static double pow3(double value); static double pow4(double value); static boolean nearZero(double value, double tolerance); static boolean nearOne(double value, double tolerance);  }### Answer:
@Test public void test_pow2() { assertThat(MathUtils.pow2(3)).isEqualTo(9); assertThat(MathUtils.pow2(2)).isEqualTo(4); assertThat(MathUtils.pow2(1)).isEqualTo(1); assertThat(MathUtils.pow2(0)).isEqualTo(0); assertThat(MathUtils.pow2(-1)).isEqualTo(1); assertThat(MathUtils.pow2(-2)).isEqualTo(4); assertThat(MathUtils.pow2(-3)).isEqualTo(9); assertThat(MathUtils.pow2(Double.POSITIVE_INFINITY)).isEqualTo(Double.POSITIVE_INFINITY); assertThat(MathUtils.pow2(Double.NEGATIVE_INFINITY)).isEqualTo(Double.POSITIVE_INFINITY); assertThat(MathUtils.pow2(Double.NaN)).isNaN(); assertThat(MathUtils.pow2(Double.POSITIVE_INFINITY)).isEqualTo(Math.pow(Double.POSITIVE_INFINITY, 2)); assertThat(MathUtils.pow2(Double.NEGATIVE_INFINITY)).isEqualTo(Math.pow(Double.NEGATIVE_INFINITY, 2)); assertThat(MathUtils.pow2(Double.NaN)).isNaN(); }