@Test(expected = RuntimeException.class) public void testGetProductBySkuError() throws Exception { Utils.setupHttpResponse("magento-graphql-error.json", httpClient, HttpStatus.SC_OK); dataService.getProductBySku(SKU, null); }
@Override public ProductInterface getProductBySku(String sku, String storeView) { if (sku == null) { return null; } try { ArrayKey key = toProductCacheKey(sku, storeView); return productCache.get(key, () -> getProductBySkuImpl(sku, storeView)).orElse(null); } catch (ExecutionException e) { throw new RuntimeException(e); } }
GraphqlDataServiceImpl implements GraphqlDataService { @Override public ProductInterface getProductBySku(String sku, String storeView) { if (sku == null) { return null; } try { ArrayKey key = toProductCacheKey(sku, storeView); return productCache.get(key, () -> getProductBySkuImpl(sku, storeView)).orElse(null); } catch (ExecutionException e) { throw new RuntimeException(e); } } }
GraphqlDataServiceImpl implements GraphqlDataService { @Override public ProductInterface getProductBySku(String sku, String storeView) { if (sku == null) { return null; } try { ArrayKey key = toProductCacheKey(sku, storeView); return productCache.get(key, () -> getProductBySkuImpl(sku, storeView)).orElse(null); } catch (ExecutionException e) { throw new RuntimeException(e); } }  }
GraphqlDataServiceImpl implements GraphqlDataService { @Override public ProductInterface getProductBySku(String sku, String storeView) { if (sku == null) { return null; } try { ArrayKey key = toProductCacheKey(sku, storeView); return productCache.get(key, () -> getProductBySkuImpl(sku, storeView)).orElse(null); } catch (ExecutionException e) { throw new RuntimeException(e); } }  @Activate void activate(GraphqlDataServiceConfiguration conf); @Override ProductInterface getProductBySku(String sku, String storeView); @Override CategoryTree getCategoryById(Integer id, String storeView); @Override CategoryTree getCategoryByPath(String urlPath, String storeView); @Override List<ProductInterface> searchProducts(String text, Integer categoryId, Integer currentPage, Integer pageSize, String storeView); @Override List<CategoryTree> searchCategories(String text, Integer categoryId, Integer currentPage, Integer pageSize, String storeView); @Override CategoryProducts getCategoryProducts(Integer categoryId, Integer currentPage, Integer pageSize, String storeView); @Override String getIdentifier(); }
GraphqlDataServiceImpl implements GraphqlDataService { @Override public ProductInterface getProductBySku(String sku, String storeView) { if (sku == null) { return null; } try { ArrayKey key = toProductCacheKey(sku, storeView); return productCache.get(key, () -> getProductBySkuImpl(sku, storeView)).orElse(null); } catch (ExecutionException e) { throw new RuntimeException(e); } }  @Activate void activate(GraphqlDataServiceConfiguration conf); @Override ProductInterface getProductBySku(String sku, String storeView); @Override CategoryTree getCategoryById(Integer id, String storeView); @Override CategoryTree getCategoryByPath(String urlPath, String storeView); @Override List<ProductInterface> searchProducts(String text, Integer categoryId, Integer currentPage, Integer pageSize, String storeView); @Override List<CategoryTree> searchCategories(String text, Integer categoryId, Integer currentPage, Integer pageSize, String storeView); @Override CategoryProducts getCategoryProducts(Integer categoryId, Integer currentPage, Integer pageSize, String storeView); @Override String getIdentifier();  }