ConfigItemSet implements ConfigItemCollection<ConfigBlock> { public boolean contains(final String name) { return this.blockByName.containsKey(name); } ConfigItemSet(final String name); @Override String getName(); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); @Override int size(); @Override boolean isEmpty(); @Override Iterator<ConfigBlock> iterator(); void add(final ConfigBlock configBlock); boolean contains(final String name); void removeByName(final String name); ConfigBlock getByName(final String name);  }
@Test public void testContains() { final ConfigItemSet m = new ConfigItemSet("set"); m.add(this.item); Assert.assertFalse(m.contains("s")); Assert.assertTrue(m.contains("n")); }