TargetValues implements Serializable { public double worst() { if (list.isEmpty()) { return 0.0; } double min = Double.MAX_VALUE; for (TargetValue v : list) { if (v.getValue() < min) { min = v.getValue(); } } return min; }  int size(); Value getValue(int record); void setValue(int record, TargetValue v); void add(TargetValue v); List<TargetValue> getList(); List<TargetValue> list(); double worst(); double average();  }
@Test public void testWorstEmptyList() { TargetValues values = new TargetValues(); assertEquals(0.0, values.worst(), EPSILON); }