### Question:
MathIgnoreNaN { public static double min(double a, double b) { if (Double.isNaN(a)) { return b; } if (Double.isNaN(b)) { return a; } return Math.min(a, b); }  static double min(double a, double b); static double max(double a, double b);  }### Answer:
@Test public void testMin1() { double result = MathIgnoreNaN.min(1, 2); assertThat(result, equalTo(1.0)); }
@Test public void testMin2() { double result = MathIgnoreNaN.min(1, Double.NaN); assertThat(result, equalTo(1.0)); }
@Test public void testMin3() { double result = MathIgnoreNaN.min(Double.NaN, 2); assertThat(result, equalTo(2.0)); }