115116117118119120121122123124125
MenuBar bar = new MenuBar(); MenuItem item0 = bar.addItem("test0", cmd); MenuItem item1 = bar.addItem("test1", cmd); // Act bar.removeItem(item0); // Assert assertEquals(0, bar.getItemIndex(item1)); }