@Test
public void testAppend() throws Exception {

    SparseVector prefixed = v1.append(0.2);
    Assert.assertArrayEquals(prefixed.getIndices(), new int[]{1, 3, 5, 7, 8});
    Assert.assertArrayEquals(prefixed.getValues(), new double[]{2, 2, 2, 2, 0.2}, 0);
}