@Test
public void suggestBoxItems() {
// Arrange
SuggestBox box = new SuggestBox();
SuggestionDisplay display = GwtReflectionUtils.getPrivateFieldValue(box, "display");
MenuBar bar = GwtReflectionUtils.getPrivateFieldValue(display, "suggestionMenu");
Command cmd = new Command() {
public void execute() {
}
};
MenuItem item0 = bar.addItem("item0", cmd);
MenuItem item1 = bar.addItem("item1", cmd);
// Act
List<MenuItem> items = WidgetUtils.getMenuItems(box);
// Assert