ConfigItemMapEntrySingleton implements ConfigItemMapEntry { @Override public Iterator<ConfigBlock> iterator() { return Collections.singletonList(this.block).iterator(); } ConfigItemMapEntrySingleton(final String name, final ConfigBlock block); static ConfigItemMapEntrySingleton createSingleton(final String name,
                                                              final ConfigBlock configBlock); static ConfigItemMapEntrySingleton createSingleton(final ConfigBlock configBlock); @Override String getName(); @Override int size(); @Override boolean isEmpty(); @Override boolean add(final ConfigBlock block); @Override ConfigBlock put(final ConfigBlock block); boolean contains(final String name); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); @Override Iterator<ConfigBlock> iterator(); @Override boolean add(final String name, final String type, final String value); ConfigBlock getByName(final String name); String set(final String name, final String value); String set(final String value);  }
@Test public void testIterator() { final Iterator<ConfigBlock> it = this.singleton.iterator(); Assert.assertTrue(it.hasNext()); Assert.assertEquals(this.item, it.next()); Assert.assertFalse(it.hasNext()); }