DoubleVector implements java.io.Serializable { public double[] getArrayRef() { return this.doubleArray; } 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 testGetArrayRef() { assertThat(emptyVector.getArrayRef(), notNullValue()); assertTrue(emptyVector.getArrayRef() == emptyVector.getArrayRef()); assertEquals(5, array5Vector.getArrayRef().length); }
@Test(expected = IndexOutOfBoundsException.class) public void testGetValueOutOfBound() { @SuppressWarnings("unused") double value = emptyVector.getArrayRef()[0]; }