SearchAdminDisplayContext { public NavigationItemList getNavigationItemList() { return _navigationItemList; }  NavigationItemList getNavigationItemList(); String getSelectedTab(); void setNavigationItemList(NavigationItemList navigationItemList); void setSelectedTab(String selectedTab);  }
@Test public void testGetNavigationItemListWithIndexInformation() { SearchAdminDisplayBuilder searchAdminDisplayBuilder = new SearchAdminDisplayBuilder( _language, _portal, new MockRenderRequest(), new MockRenderResponse()); searchAdminDisplayBuilder.setIndexInformation( Mockito.mock(IndexInformation.class)); SearchAdminDisplayContext searchAdminDisplayContext = searchAdminDisplayBuilder.build(); NavigationItemList navigationItemList = searchAdminDisplayContext.getNavigationItemList(); Assert.assertEquals( navigationItemList.toString(), 3, navigationItemList.size()); }
@Test public void testGetNavigationItemListWithoutIndexInformation() { SearchAdminDisplayBuilder searchAdminDisplayBuilder = new SearchAdminDisplayBuilder( _language, _portal, new MockRenderRequest(), new MockRenderResponse()); searchAdminDisplayBuilder.setIndexInformation(null); SearchAdminDisplayContext searchAdminDisplayContext = searchAdminDisplayBuilder.build(); NavigationItemList navigationItemList = searchAdminDisplayContext.getNavigationItemList(); Assert.assertEquals( navigationItemList.toString(), 2, navigationItemList.size()); }