### Question:
List extends Collection<E> implements Equatable<List<E>> { public abstract int lastIndexOf(E object); protected  List(); void add(int location, E object); @Override boolean add(E object); boolean addAll(int location, Collection<? extends E> collection); @Override boolean equals(Object object); @Override boolean equalTo(@Nullable List<E> otherList); abstract E get(int location); @Override int hashCode(); abstract int indexOf(E object); abstract int lastIndexOf(E object); abstract E remove(int location); abstract E set(int location, E object);  }### Answer:
@Test public void testLastIndexOf() { List<String> list = new MockArrayList<String>(); list.addAll(new ArrayList<String>("1", "2", "3", "4", "5", "5", "4", "3", "2", "1")); assertEquals("find 6 in the list do not contain 6", -1, list.lastIndexOf("6")); assertEquals("did not return the right location of element 4", 6, list.lastIndexOf("4")); assertEquals("find null in the list do not contain null element", -1, list.lastIndexOf(null)); list.add(null); assertEquals("did not return the right location of element null", 10, list.lastIndexOf(null)); }