assertMenu( menu.getItems().get( 2 ), "111", "222", "333" );
}
@Test
public void multiLevelSortingWithOrderValues() {
Menu menu = new Menu( "any" );
Menu subMenu = new Menu( "/aaa", "ccc" );
subMenu.addItem( "111", "333" ).setOrder( Ordered.HIGHEST_PRECEDENCE );
subMenu.addItem( "222", "222" );
subMenu.addItem( "333", "111" ).setOrder( Ordered.LOWEST_PRECEDENCE );
menu.addItem( subMenu );
menu.addItem( "/bbb", "aaa" );
Menu otherSubMenu = new Menu( "/ccc", "bbb" );
otherSubMenu.addItem( "111", "111" );
otherSubMenu.addItem( "222", "333" );
otherSubMenu.addItem( "333", "222" ).setOrder( 1 );
menu.addItem( otherSubMenu );
menu.sort();
assertMenu( menu, "aaa", "bbb", "ccc" );