Menu item = menu.addItem( "path2" );
item.addItem( "sub1" );
Menu subItem = item.addItem( "sub2" );
subItem.addItem( "subsub1" ).setSelected( true );
subItem.addItem( "subsub2" );
subItem.getItemWithPath( "subsub1" ).setSelected( false );
assertFalse( menu.getItemWithPath( "path1" ).isSelected() );
assertTrue( menu.getItemWithPath( "path2" ).isSelected() );