MathTools { static double max(double[] values) { double max = values[0]; for (double value : values) if (value > max) max = value; return max; }    }
@Test public void testMax_arrayint() { int[] ints = {1, 2, 3, 4, 5}; Assert.assertEquals(5, MathTools.max(ints)); }