ConfigItemMapNamed implements ConfigItemCollection<ConfigItemMapEntry> { public ConfigItemMapEntry getByName(final String name) { return this.map.get(name); } 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 testGetByName() { final ConfigItemMapNamed m = new ConfigItemMapNamed("mapnamed"); m.put(this.set); Assert.assertEquals(this.set, m.getByName("set")); Assert.assertNull(m.getByName("s")); }