array.addAll(Arrays.asList(1, 2, 3, 4, 5, 4, 3));
Assert.assertEquals(2, array.indexOf(3));
Assert.assertEquals(6, array.lastIndexOf(3));
{
AtomicInteger count = new AtomicInteger();
for (ListIterator<Object> iter = array.listIterator(); iter.hasNext(); iter.next()) {
count.incrementAndGet();
}
Assert.assertEquals(7, count.get());
}
{