@Test
public void testRemoveZeroValues() throws Exception {

    int[] indices = new int[]{1, 3, 5};
    double[] values = new double[]{0.0, 3.0, 0.0};
    SparseVector v = new SparseVector(6, indices, values);
    v.removeZeroValues();
    Assert.assertArrayEquals(v.getIndices(), new int[]{3});
    Assert.assertArrayEquals(v.getValues(), new double[]{3}, TOL);
}