@Test
  public void testBindings() throws Exception {
    List<TestClass> items = new ArrayList<TestClass>();
    XulMenuList list2 = (XulMenuList) doc.getElementById("list2");

    items.add(new TestClass("foo"));
    items.add(new TestClass("bar"));
    items.add(new TestClass("baz"));
    items.add(new TestClass("bang"));
    list2.setElements(items);

    assertEquals(4, list2.getElements().size());
  }
 private void selectDataSourceMenuList(IWizardStep activatingWizardStep, int index) {
   if (datatypeMenuList.getElements().size() > 0 && index != -1 && activeDatasource != null) {
     if (activeDatasource.getId().equals("NONE")) {
       this.datatypeMenuList.setSelectedIndex(0);
     } else {
       if (activeDatasource.getId().equals("CSV")) {
         this.datatypeMenuList.setSelectedIndex(1);
       } else {
         if (activeDatasource.getId().equals("MULTI-TABLE-DS")) {
           this.datatypeMenuList.setSelectedIndex(3);
         } else {
           if (activeDatasource.getId().equals("SQL-DS")) {
             this.datatypeMenuList.setSelectedIndex(2);
           }
         }
       }
     }
   }
 }
 @Test
 public void testSetSelecetdIndex() throws Exception {
   XulMenuitem item = (XulMenuitem) doc.getElementById("sales");
   list.setSelectedIndex(0);
   assertEquals(list.getSelectedItem().toString(), item.getLabel());
 }
 @Test
 public void testGetSelecetdIndex() throws Exception {
   assertEquals(1, list.getSelectedIndex());
 }
 @Test
 public void testGetBinding() throws Exception {
   assertEquals("label", list.getBinding());
 }
 @Test
 public void testGetElements() throws Exception {
   assertEquals(3, list.getElements().size());
 }
  @Test
  public void testGetSelectedItem() throws Exception {
    XulMenuitem item = (XulMenuitem) doc.getElementById("regions");

    assertEquals(list.getSelectedItem().toString(), item.getLabel());
  }
 public void resetSelectedDatasource() {
   datatypeMenuList.setSelectedIndex(0);
 }