@Test
public void testSetElements() throws Exception {

  XulListbox box = (XulListbox) doc.getElementById( "listbox2" );
  List<Person> peeps = new ArrayList<Person>();
  peeps.add( new Person( "Nick" ) );
  peeps.add( new Person( "Barb" ) );
  peeps.add( new Person( "Kenneth" ) );
  box.setElements( peeps );
  assertEquals( 3, box.getRowCount() );
  List<XulComponent> items = box.getChildNodes();
  assertEquals( "Nick", ( (XulListitem) items.get( 0 ) ).getLabel() );
  assertEquals( "Barb", ( (XulListitem) items.get( 1 ) ).getLabel() );
  assertEquals( "Kenneth", ( (XulListitem) items.get( 2 ) ).getLabel() );
}