@Test
public void testIterator() throws Exception {

    VectorIterator iterator = v1.iterator();
    Assert.assertTrue(iterator.hasNext());
    Assert.assertEquals(iterator.getIndex(), 1);
    Assert.assertEquals(iterator.getValue(), 2, 0);
    iterator.next();
    Assert.assertTrue(iterator.hasNext());
    Assert.assertEquals(iterator.getIndex(), 3);
    Assert.assertEquals(iterator.getValue(), 2, 0);
    iterator.next();
    Assert.assertTrue(iterator.hasNext());
    Assert.assertEquals(iterator.getIndex(), 5);
    Assert.assertEquals(iterator.getValue(), 2, 0);
    iterator.next();
    Assert.assertTrue(iterator.hasNext());
    Assert.assertEquals(iterator.getIndex(), 7);
    Assert.assertEquals(iterator.getValue(), 2, 0);
    iterator.next();
    Assert.assertFalse(iterator.hasNext());
}