public synchronized void pollSupplier() {
        if (!orderIdByPartType.isEmpty()) {
            List<Long> orderIds = new ArrayList<>(orderIdByPartType.values());
            for (Long orderId : orderIds) {
                if (orderId != null) {
                    if (supplier.isReadyForShipment(orderId)) {
                        Order shippedOrder = supplier.shipOrder(orderId);
                        stock.put(shippedOrder.getType(), shippedOrder.getQuantity());
                        orderIdByPartType.remove(shippedOrder.getType());
                    }
                }
            }
        }
    }