ConfigItemMapEntrySequence implements ConfigItemMapEntry { public String set(final int i, final String value) { final ConfigBlock block = this.blocks.get(i); if (block instanceof ConfigItem) { final ConfigItem item = (ConfigItem) block; final String previousValue = item.getValue(); item.setValue(value); return previousValue; } return null; } ConfigItemMapEntrySequence(final String name, final List<ConfigBlock> blocks); static ConfigItemMapEntrySequence createSequence(); static ConfigItemMapEntrySequence createSequence(final String name); @Override String getName(); @Override int size(); @Override boolean isEmpty(); @Override boolean add(final ConfigBlock block); @Override ConfigBlock put(final ConfigBlock block); void remove(final int i); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); @Override Iterator<ConfigBlock> iterator(); String set(final int i, final String value); @Override boolean add(final String name, final String type, final String value);  }
@Test public void testSet() { this.sequence.add(this.block); this.sequence.add(this.item); Assert.assertNull(this.sequence.set(0, "value")); Assert.assertEquals("v", this.sequence.set(1, "value")); Assert.assertEquals("value", this.item.getValue()); }