ListView extends CollectionView<E> implements List<E> { public int lastIndexOf(Object obj) { return ((List<E>) this.collection).lastIndexOf(obj); } 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 testLastIndexOf() { this.source.addAll(Arrays.asList("1", "1", "2", "2", "3", "3")); assertEquals(-1, ((ListView) this.testobj).lastIndexOf("0")); assertEquals(1, ((ListView) this.testobj).lastIndexOf("1")); assertEquals(3, ((ListView) this.testobj).lastIndexOf("2")); assertEquals(5, ((ListView) this.testobj).lastIndexOf("3")); assertEquals(-1, ((ListView) this.testobj).lastIndexOf("4")); }