ConfigItemMapEntrySet implements ConfigItemMapEntry { public String set(final String name, final String value) { final ConfigBlock block = this.blockByName.get(name); if (block instanceof ConfigItem) { final ConfigItem item = (ConfigItem) block; final String previousValue = item.getValue(); item.setValue(value); return previousValue; } return null; } ConfigItemMapEntrySet(final Set<ConfigBlock> blocks);   ConfigItemMapEntrySet(final String name, final Set<ConfigBlock> blocks); static ConfigItemMapEntrySet createSet(); static ConfigItemMapEntrySet createSet(final String name); @Override String getName(); @Override int size(); @Override boolean isEmpty(); boolean contains(final String name); @Override boolean add(final ConfigBlock block); @Override ConfigBlock put(final ConfigBlock block); void remove(final Object o); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); @Override Iterator<ConfigBlock> iterator(); ConfigBlock getByName(final String name); String set(final String name, final String value); @Override boolean add(final String name, final String type, final String value);  }
@Test public void testSet() { this.set.add(this.item); Assert.assertEquals("v", this.set.set("n", "value")); Assert.assertNull(this.set.set("name", "value")); }