498499500501502503504505506507508509
{ List<String> names = new ArrayList<String>(); while (iterator.hasNext()) { ItemImpl item = (ItemImpl)iterator.next(); names.add(item.getName()); } //compare names assertEquals(expectedNames.length, names.size());