public Order shipOrder(Long orderId) {
        if (orderId == null) {
            throw new IllegalArgumentException("OrderId cannot be null");
        }
        Order order = orderById.get(orderId);
        if (order == null) {
            throw new IllegalArgumentException("No such order Id: " + orderId);
        }
        try {
            order.setStatus(Order.Status.SHIPPED);
        } catch (IllegalStateException ex) {
            throw new IllegalArgumentException("Order should be in READY_FOR_SHIPMENT state in order to be shipped successfully.", ex);
        }
        System.out.println("Order shipped: " + order);
        return order;
    }