ConfigItemMapEntrySequence implements ConfigItemMapEntry { @Override public boolean add(final ConfigBlock block) { return this.blocks.add(block); } 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 testAdd() { this.sequence.add(this.block); Assert.assertEquals(1, this.sequence.size()); Assert.assertFalse(this.sequence.isEmpty()); Assert.assertEquals("seq", this.sequence.getName()); final Iterator<ConfigBlock> it = this.sequence.iterator(); Assert.assertTrue(it.hasNext()); Assert.assertEquals(this.block, it.next()); Assert.assertFalse(it.hasNext()); }
@Test public void testAppendXML() throws Exception { this.sequence.add(this.item); this.sequence.add(this.block); TestHelper.assertXMLEquals( "<config:config-item-map-entry config:name=\"seq\">" + this.itemXML + this.blockXML + "</config:config-item-map-entry>", this.sequence); }