@Test public void testSearchResultPage() { SearchbarImpl searchbar = new SearchbarImpl(); Whitebox.setInternalState(searchbar, "currentPage", context.currentPage("/content/pageA")); Assert.assertEquals("/content/pageB.html", searchbar.getSearchResultsPageUrl()); }
@Override public String getSearchResultsPageUrl() { if (searchResultsPage == null) { searchResultsPage = SiteNavigation.getSearchResultsPage(currentPage); } return searchResultsPage.getPath() + ".html"; }
SearchbarImpl implements Searchbar { @Override public String getSearchResultsPageUrl() { if (searchResultsPage == null) { searchResultsPage = SiteNavigation.getSearchResultsPage(currentPage); } return searchResultsPage.getPath() + ".html"; } }
SearchbarImpl implements Searchbar { @Override public String getSearchResultsPageUrl() { if (searchResultsPage == null) { searchResultsPage = SiteNavigation.getSearchResultsPage(currentPage); } return searchResultsPage.getPath() + ".html"; }  }
SearchbarImpl implements Searchbar { @Override public String getSearchResultsPageUrl() { if (searchResultsPage == null) { searchResultsPage = SiteNavigation.getSearchResultsPage(currentPage); } return searchResultsPage.getPath() + ".html"; }  @Override String getSearchResultsPageUrl(); }
SearchbarImpl implements Searchbar { @Override public String getSearchResultsPageUrl() { if (searchResultsPage == null) { searchResultsPage = SiteNavigation.getSearchResultsPage(currentPage); } return searchResultsPage.getPath() + ".html"; }  @Override String getSearchResultsPageUrl();  }