### 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.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 @Transactional OrderDTO cancel(OrderDTO orderDTO); @Override @Transactional OrderDTO finish(OrderDTO orderDTO); @Override @Transactional OrderDTO paid(OrderDTO orderDTO); @Override Page<OrderDTO> findList(Pageable pageable);  }### Answer:
@Test public void paid() throws Exception { OrderDTO orderDTO = orderService.findOne(ORDER_ID); OrderDTO result = orderService.paid(orderDTO); Assert.assertEquals(PayStatusEnum.SUCCESS.getCode(), result.getPayStatus()); }