### Question:
ProductServiceImpl implements ProductService { @Override public ProductInfo offSale(String productId) { Optional<ProductInfo> productInfo = repository.findById(productId); if(!productInfo.isPresent()){ throw new SellException(ResultEnum.PRODUCT_NOT_EXIST); } if(productInfo.get().getProductStatusEnum() == ProductStatusEnum.DOWN){ throw new SellException(ResultEnum.PRODUCT_STATUS_ERROR); } productInfo.get().setProductStatus(ProductStatusEnum.DOWN.getCode()); return repository.save(productInfo.get()); }  @Override Optional<ProductInfo> findById(String productId); @Override List<ProductInfo> findUpAll(); @Override Page<ProductInfo> findAll(Pageable pageable); @Override List<ProductInfo> findByCategoryType(Integer categoryType); @Override ProductInfo save(ProductInfo productInfo); @Override @Transactional void increaseStock(List<CartDTO> cartDTOList); @Override @Transactional void decreaseStock(List<CartDTO> cartDTOList); @Override ProductInfo onSale(String productId); @Override ProductInfo offSale(String productId); @Override void delete(String productId);  }### Answer:
@Test public void offSaleTest(){ ProductInfo result = productService.offSale("111"); Assert.assertEquals(ProductStatusEnum.DOWN , result.getProductStatusEnum()); }