@Test public void shouldUpdateOrderStatusAndFtpComment() throws Exception { Order order = new Order(make(a(defaultRequisition, with(id, 123L)))); when(requisitionService.getFullRequisitionById(order.getRnr().getId())).thenReturn(order.getRnr()); orderService.updateOrderStatus(order); verify(orderRepository).updateOrderStatus(order); verify(orderEventService).notifyForStatusChange(order); }
public void updateOrderStatus(Order order) { orderRepository.updateOrderStatus(order); order.setRnr(requisitionService.getFullRequisitionById(order.getId())); orderEventService.notifyForStatusChange(order); }
OrderService { public void updateOrderStatus(Order order) { orderRepository.updateOrderStatus(order); order.setRnr(requisitionService.getFullRequisitionById(order.getId())); orderEventService.notifyForStatusChange(order); } }
OrderService { public void updateOrderStatus(Order order) { orderRepository.updateOrderStatus(order); order.setRnr(requisitionService.getFullRequisitionById(order.getId())); orderEventService.notifyForStatusChange(order); }  }
OrderService { public void updateOrderStatus(Order order) { orderRepository.updateOrderStatus(order); order.setRnr(requisitionService.getFullRequisitionById(order.getId())); orderEventService.notifyForStatusChange(order); }  @Autowired void setPageSize(@Value("${order.page.size}") String pageSize); @Transactional void convertToOrder(List<Rnr> rnrList, Long userId); List<Order> getOrdersForPage(int page, Long userId, String rightName); List<Order> getOrdersForPage(int page, Long userId, String right, Long supplyDepot, Long program, Long period); Order getOrder(Long id); void updateStatusAndShipmentIdForOrders(Set<String> orderNumbers, ShipmentFileInfo shipmentFileInfo); OrderFileTemplateDTO getOrderFileTemplateDTO(); @Transactional void saveOrderFileTemplate(OrderFileTemplateDTO orderFileTemplateDTO, Long userId); OrderNumberConfiguration getOrderNumberConfiguration(); @Transactional void updateOrderNumberConfiguration(OrderNumberConfiguration orderNumberConfiguration); Set<DateFormat> getAllDateFormats(); void updateOrderStatus(Order order); boolean isShippable(String orderNumber); Integer getNumberOfPages(); Integer getNumberOfPages(Long supplyDepot, Long program, Long period); Integer getPageSize(); List<Order> searchByStatusAndRight(Long userId, String rightName, List<OrderStatus> statuses, Long programId, Long facilityId); boolean hasStatus(String orderNumber, OrderStatus... statuses); Order getByOrderNumber(String orderNumber); }
OrderService { public void updateOrderStatus(Order order) { orderRepository.updateOrderStatus(order); order.setRnr(requisitionService.getFullRequisitionById(order.getId())); orderEventService.notifyForStatusChange(order); }  @Autowired void setPageSize(@Value("${order.page.size}") String pageSize); @Transactional void convertToOrder(List<Rnr> rnrList, Long userId); List<Order> getOrdersForPage(int page, Long userId, String rightName); List<Order> getOrdersForPage(int page, Long userId, String right, Long supplyDepot, Long program, Long period); Order getOrder(Long id); void updateStatusAndShipmentIdForOrders(Set<String> orderNumbers, ShipmentFileInfo shipmentFileInfo); OrderFileTemplateDTO getOrderFileTemplateDTO(); @Transactional void saveOrderFileTemplate(OrderFileTemplateDTO orderFileTemplateDTO, Long userId); OrderNumberConfiguration getOrderNumberConfiguration(); @Transactional void updateOrderNumberConfiguration(OrderNumberConfiguration orderNumberConfiguration); Set<DateFormat> getAllDateFormats(); void updateOrderStatus(Order order); boolean isShippable(String orderNumber); Integer getNumberOfPages(); Integer getNumberOfPages(Long supplyDepot, Long program, Long period); Integer getPageSize(); List<Order> searchByStatusAndRight(Long userId, String rightName, List<OrderStatus> statuses, Long programId, Long facilityId); boolean hasStatus(String orderNumber, OrderStatus... statuses); Order getByOrderNumber(String orderNumber); static String SUPPLY_LINE_MISSING_COMMENT; }