BenchmarkUtils { public static double max(Iterable<Double> iterable) { Iterator<Double> iterator = iterable.iterator(); double max = Double.MIN_VALUE; while (iterator.hasNext()) { double d = iterator.next(); if (d > max) { max = d; } } return max; } private  BenchmarkUtils(); static double max(Iterable<Double> iterable); static double avg(Iterable<Double> iterable); static void putIfAbsent(Map map, Object key, Object val); static int getInt(Map map, Object key, int def); static boolean ifAckEnabled(Config config);  }
@Test(dataProvider = "getMaxes") public void testMax(Iterable<Double> numbers, double expected) { assertThat(BenchmarkUtils.max(numbers)).isEqualTo(expected); }