array list with internal iterator and it's test case