### Question:
GraphqlDataServiceImpl implements GraphqlDataService { @Override public CategoryTree getCategoryById(Integer id, String storeView) { if (id == null) { return null; } try { ArrayKey key = toCategoryDataCacheKey(id, storeView); List<CategoryTree> categoryTrees = categoryDataCache.get(key, () -> getCategoryByIdImpl(id, storeView)).orElse(null); return categoryTrees == null ? null : categoryTrees.get(0); } catch (Exception 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();  }### Answer:
@Test(expected = RuntimeException.class) public void testGetCategoryByIdError() throws Exception { Utils.setupHttpResponse("magento-graphql-error.json", httpClient, HttpStatus.SC_OK); dataService.getCategoryById(1, null); }
@Test public void testGetCategoryByIdNull() throws Exception { Utils.setupHttpResponse("magento-graphql-error.json", httpClient, HttpStatus.SC_OK); assertNull(dataService.getCategoryById(null, null)); }