ListView extends CollectionView<E> implements List<E> { public void add(int index, E element) { throw new UnsupportedOperationException(); } ListView(List<E> list); void add(int index, E element); boolean addAll(int index, Collection<? extends E> collection); boolean equals(Object obj); E get(int index); int hashCode(); int indexOf(Object obj); int lastIndexOf(Object obj); ListIterator<E> listIterator(); ListIterator<E> listIterator(int index); E remove(int index); E set(int index, E element); List<E> subList(int fromIndex, int toIndex);  }
@Test public void testAddFromIndex() { assertThrows(UnsupportedOperationException.class, () -> ((ListView) this.testobj).add(0, new Object())); }
@Test public void testListIteratorWithOffset() { for (int i = 0; i < 3; ++i) { this.testListIteratorAscending(0); this.testListIteratorDescending(0); this.source.add(new Object()); this.source.add(new Object()); this.source.add(new Object()); this.source.add(new Object()); this.source.add(new Object()); for (int j = 0; j < this.source.size(); ++j) { this.testListIteratorAscending(j); this.testListIteratorDescending(j); } } }