" <g:MenuBar vertical='true'>",
" <g:MenuItem text='Sub item 1'>",
" <g:MenuItem text='Sub item 2'>",
" <g:MenuItem text='Separate item'>");
refresh();
MenuBarInfo menu = getObjectByName("bar");
MenuItemInfo item_1 = menu.getItems().get(0);
MenuItemInfo item_2 = menu.getItems().get(1);
MenuBarInfo subMenu = item_1.getSubMenu();
MenuItemInfo subMenuItem_1 = subMenu.getItems().get(0);
MenuItemInfo subMenuItem_2 = subMenu.getItems().get(1);
// bad adapters
{
assertNull(menu.getAdapter(List.class));
assertNull(item_1.getAdapter(List.class));
}