DoubleVector implements java.io.Serializable { public double sumOfValues() { double sum = 0.0; for (double element : this.doubleArray) { sum += element; } return sum; } DoubleVector();  DoubleVector(double[] toCopy);  DoubleVector(DoubleVector toCopy); double[] getArrayRef(); double[] getArrayCopy(); int numNonZeroEntries(); void setValue(int index, double value); void addToValue(int index, double value); double sumOfValues(); void getSingleLineDescription(StringBuilder out); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testSumOfValues() { assertEquals(1.1 + 2.5 + 4.7, array5Vector.sumOfValues(), Double.MIN_NORMAL); }