### Question:
OrderServiceImpl implements OrderService { @Override @Transactional public OrderDTO paid(OrderDTO orderDTO) { if(!orderDTO.getOrderStatus().equals(OrderStatusEnum.NEW.getCode())){ log.error("【订单支付成功】 订单状态不正确 , orderId={} , orderStatus={}" , orderDTO.getOrderId() , orderDTO.getOrderStatus()); throw new SellException(ResultEnum.ORDER_STATUS_ERROR); } if( !orderDTO.getPayStatus().equals(PayStatusEnum.WAIT.getCode())){ log.error("【订单支付完成】 订单支付状态不正确 , orderDTO={}" , orderDTO); throw new SellException(ResultEnum.ORDER_PAY_STATUS_ERROR); } orderDTO.setOrderStatus(OrderStatusEnum.NEW_PAYED.getCode()); orderDTO.setPayStatus(PayStatusEnum.SUCCESS.getCode()); OrderMaster orderMaster = new OrderMaster(); BeanUtils.copyProperties(orderDTO , orderMaster); OrderMaster updateResult = orderMasterRepository.save(orderMaster); if(updateResult == null){ log.error("【订单支付完成】 更新失败 , orderMaster={}" , orderMaster); throw new SellException(ResultEnum.ORDER_UPDATE_FAIL); } return orderDTO; }  @Override @Transactional OrderDTO create(OrderDTO orderDTO); @Override OrderDTO findOne(String orderId); @Override Page<OrderDTO> findList(String buyerOpenid, Pageable pageable); @Override Page<OrderDTO> findList(Pageable pageable); @Override Page<OrderDTO> findOrderMastersByCreateTimeDesc(Pageable pageable); @Override List<OrderDTO> findListStats(String buyerOpenid, Integer orderStatus); @Override @Transactional OrderDTO cancel(OrderDTO orderDTO); @Override @Transactional OrderDTO finish(OrderDTO orderDTO); @Override @Transactional OrderDTO paid(OrderDTO orderDTO);  }### Answer:
@Test public void paid() { OrderDTO orderDTO = orderService.findOne(ORDER_ID); OrderDTO result = orderService.paid(orderDTO); Assert.assertEquals(PayStatusEnum.SUCCESS.getCode(), result.getPayStatus()); }