ConfigItemMapNamed implements ConfigItemCollection<ConfigItemMapEntry> { @Override public Iterator<ConfigItemMapEntry> iterator() { return this.map.values().iterator(); } ConfigItemMapNamed(final String name); @Override String getName(); @Override int size(); @Override boolean isEmpty(); boolean contains(final String name); ConfigItemMapEntry getByName(final String name); ConfigItemMapEntry put(final ConfigItemMapEntry value); ConfigItemMapEntry removeByName(final String name); @Override Iterator<ConfigItemMapEntry> iterator(); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); void clear();  }
@Test public void testIterator() { final ConfigItemMapNamed m = new ConfigItemMapNamed("mapnamed"); m.put(this.set); final Iterator<ConfigItemMapEntry> i = m.iterator(); Assert.assertTrue(i.hasNext()); Assert.assertEquals(this.set, i.next()); Assert.assertFalse(i.hasNext()); }