### Question:
ProductServiceImpl implements ProductService { @Override public ProductInfo onSale(String productId) { ProductInfo productInfo = repository.findOne(productId); if (productInfo == null) { throw new SellException(ResultEnum.PRODUCT_NOT_EXIST); } if (productInfo.getProductStatusEnum() == ProductStatusEnum.UP) { throw new SellException(ResultEnum.PRODUCT_STATUS_ERROR); } productInfo.setProductStatus(ProductStatusEnum.UP.getCode()); return repository.save(productInfo); }  @Override ProductInfo findOne(String productId); @Override List<ProductInfo> findUpAll(); @Override Page<ProductInfo> findAll(Pageable pageable); @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);  }### Answer:
@Test public void onSale() { ProductInfo result = productService.onSale("123456"); Assert.assertEquals(ProductStatusEnum.UP, result.getProductStatusEnum()); }