@Test public void testMissingSearchTerm() { searchResultsModel = context.request().adaptTo(SearchResultsImpl.class); Collection<ProductListItem> products = searchResultsModel.getProducts(); Assert.assertTrue("Products list is empty", products.isEmpty()); Mockito.verify(graphqlClient, never()).execute(any(), any(), any()); Mockito.verify(graphqlClient, never()).execute(any(), any(), any(), any()); }
@Nonnull @Override public Collection<ProductListItem> getProducts() { return getSearchResultsSet().getProductListItems(); }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { @Nonnull @Override public Collection<ProductListItem> getProducts() { return getSearchResultsSet().getProductListItems(); } }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { @Nonnull @Override public Collection<ProductListItem> getProducts() { return getSearchResultsSet().getProductListItems(); }  }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { @Nonnull @Override public Collection<ProductListItem> getProducts() { return getSearchResultsSet().getProductListItems(); }  @Nonnull @Override Collection<ProductListItem> getProducts(); @Nonnull @Override SearchResultsSet getSearchResultsSet(); }
SearchResultsImpl extends ProductCollectionImpl implements SearchResults { @Nonnull @Override public Collection<ProductListItem> getProducts() { return getSearchResultsSet().getProductListItems(); }  @Nonnull @Override Collection<ProductListItem> getProducts(); @Nonnull @Override SearchResultsSet getSearchResultsSet();  }