### Question:
Statistics { public void setValues(Iterable<Double> vals) { if(vals==null) throw new IllegalArgumentException("vector is null"); v.clear(); for(Double d : vals) v.add(d); } Statistics();  Statistics(Iterable<Double> values); void clearAll(); int count(); double max(); double min(); double mean(); double median(); double mode(); int modeOccurrenceCount(); double range(); double standardDeviation(); Vector getValues(); void addValue(Double double1); void addValue(double d); void setValues(Iterable<Double> vals); void setValues(Calculable[] calcs); void removeValues(double d, boolean removeAll); void removeValues(Double double1, boolean removeAll); void removeValue(int location); void removeValues(Double low, Double high); void removeValues(double low, double high); double sum();  }### Answer:
@Test public void testSetValues() { Statistics stat = new Statistics(); for (int i = 0; i < 10; i++) { Vector<Double> v = new Vector<>(); int count = (int) (Math.random() * 100); for (int j = 0; j < count; j++) { v.add(Math.random()); stat.setValues(v); Assert.assertEquals(v, stat.getValues()); Assert.assertNotSame(v, stat.getValues()); } } List<Double> v = new ArrayList<>(); stat.setValues(v); Assert.assertEquals(0, stat.count()); v.add((double) 0); Assert.assertEquals(0, stat.count()); try { stat.setValues((List<Double>)null); Assert.fail("IllegalArgumentException expected but not thrown"); } catch (IllegalArgumentException e) { } }