@Test public void testNoMagentoGraphqlClient() { searchResultsModel = context.request().adaptTo(SearchResultsImpl.class); Mockito.when(pageResource.adaptTo(GraphqlClient.class)).thenReturn(null); searchResultsModel = context.request().adaptTo(SearchResultsImpl.class); Collection<ProductListItem> products = searchResultsModel.getProducts(); Assert.assertTrue("Products list is empty", products.isEmpty()); }
@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();  }