ArrayFeatureVector extends FeatureVector { public java.util.Iterator<Entry> iterator() { return new Iterator(features); } ArrayFeatureVector(); double get(int index); java.util.Iterator<Entry> iterator(); void set(int index, double value); double[] toArray();  }
@Test public void testPlainConstructor() { Iterator<FeatureVector.Entry> it = fv1.iterator(); assertFalse(it.hasNext()); }
@Test public void testRemove() { boolean exceptionThrown = false; try { Iterator<FeatureVector.Entry> it = fv2.iterator(); it.remove(); } catch (UnsupportedOperationException e) { exceptionThrown = true; } assertTrue(exceptionThrown); }