public void setStatus(Status newStatus) {
        switch (newStatus) {
            case READY_FOR_SHIPMENT:
                if (status != Status.ORDERED) {
                    throw new IllegalStateException("Illegal state transition: " + status + " -> " + newStatus);
                }
                break;
            case SHIPPED:
                if (status != Status.READY_FOR_SHIPMENT) {
                    throw new IllegalStateException("Illegal state transition: " + status + " -> " + newStatus);
                }
                break;
            default:
                throw new IllegalStateException("Illegal state transition: " + status + " -> " + newStatus);
        }
        status = newStatus;
    }