@Override
  public ListIterator<T> listIterator() {
    return new ListItr(0);
  }
@Test
  public void listIterator() {
    String[] array = new String[]{"a", "b", "c"};
    UnmodifiableArrayList<String> list = new UnmodifiableArrayList<>(array);
    ListIterator<String> iterFromFirst = list.listIterator();
    assertTrue(iterFromFirst.hasNext());
    assertFalse(iterFromFirst.hasPrevious());

    ListIterator<String> iterFromLast = list.listIterator(array.length);
    assertEquals(array.length, iterFromLast.nextIndex());
    assertEquals(array.length - 1, iterFromLast.previousIndex());
    assertFalse(iterFromLast.hasNext());
    assertEquals(array[array.length - 1], iterFromLast.previous());
  }