@Test public void testExtendProductQuery() { SearchOptionsImpl searchOptions = new SearchOptionsImpl(); searchOptions.setPageSize(6); searchOptions.setSearchQuery(SEARCH_QUERY); searchOptions.setCurrentPage(1); serviceUnderTest.performSearch( searchOptions, resource, productPage, request, p -> p.createdAt() .addCustomSimpleField("is_returnable")); ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); verify(magentoGraphqlClient, times(1)).execute(captor.capture()); assertThat(captor.getValue()).contains("created_at,is_returnable_custom_:is_returnable"); }
@Nonnull @Override public SearchResultsSet performSearch( final SearchOptions searchOptions, final Resource resource, final Page productPage, final SlingHttpServletRequest request) { return performSearch(searchOptions, resource, productPage, request, null); }
SearchResultsServiceImpl implements SearchResultsService { @Nonnull @Override public SearchResultsSet performSearch( final SearchOptions searchOptions, final Resource resource, final Page productPage, final SlingHttpServletRequest request) { return performSearch(searchOptions, resource, productPage, request, null); } }
SearchResultsServiceImpl implements SearchResultsService { @Nonnull @Override public SearchResultsSet performSearch( final SearchOptions searchOptions, final Resource resource, final Page productPage, final SlingHttpServletRequest request) { return performSearch(searchOptions, resource, productPage, request, null); } SearchResultsServiceImpl();  SearchResultsServiceImpl(final MagentoGraphqlClient magentoGraphqlClient); }
SearchResultsServiceImpl implements SearchResultsService { @Nonnull @Override public SearchResultsSet performSearch( final SearchOptions searchOptions, final Resource resource, final Page productPage, final SlingHttpServletRequest request) { return performSearch(searchOptions, resource, productPage, request, null); } SearchResultsServiceImpl();  SearchResultsServiceImpl(final MagentoGraphqlClient magentoGraphqlClient); @Nonnull @Override SearchResultsSet performSearch(
        final SearchOptions searchOptions,
        final Resource resource,
        final Page productPage,
        final SlingHttpServletRequest request); @Nonnull @Override SearchResultsSet performSearch(
        final SearchOptions searchOptions,
        final Resource resource,
        final Page productPage,
        final SlingHttpServletRequest request,
        final Consumer<ProductInterfaceQuery> productQueryHook); @Nonnull @Override Pair<CategoryInterface, SearchResultsSet> performSearch(
        final SearchOptions searchOptions,
        final Resource resource,
        final Page productPage,
        final SlingHttpServletRequest request,
        final Consumer<ProductInterfaceQuery> productQueryHook,
        final AbstractCategoryRetriever categoryRetriever); }
SearchResultsServiceImpl implements SearchResultsService { @Nonnull @Override public SearchResultsSet performSearch( final SearchOptions searchOptions, final Resource resource, final Page productPage, final SlingHttpServletRequest request) { return performSearch(searchOptions, resource, productPage, request, null); } SearchResultsServiceImpl();  SearchResultsServiceImpl(final MagentoGraphqlClient magentoGraphqlClient); @Nonnull @Override SearchResultsSet performSearch(
        final SearchOptions searchOptions,
        final Resource resource,
        final Page productPage,
        final SlingHttpServletRequest request); @Nonnull @Override SearchResultsSet performSearch(
        final SearchOptions searchOptions,
        final Resource resource,
        final Page productPage,
        final SlingHttpServletRequest request,
        final Consumer<ProductInterfaceQuery> productQueryHook); @Nonnull @Override Pair<CategoryInterface, SearchResultsSet> performSearch(
        final SearchOptions searchOptions,
        final Resource resource,
        final Page productPage,
        final SlingHttpServletRequest request,
        final Consumer<ProductInterfaceQuery> productQueryHook,
        final AbstractCategoryRetriever categoryRetriever);  }