public void setWantedState(NodeState state) {
        if (state == null) {
            state = new NodeState(node.getType(), State.UP);
        }
        NodeState newWanted = new NodeState(node.getType(), state.getState());
        newWanted.setDescription(state.getDescription());
        if (!newWanted.equals(state)) {
            try {
                throw new Exception();
            } catch (Exception e) {
                StringWriter sw = new StringWriter();
                e.printStackTrace(new PrintWriter(sw));
                log.warning("Attempted to set wanted state with more than just a main state. Extra data stripped. Original data '" + state.serialize(true) + ":\n" + sw);
            }
        }
        wantedState = newWanted;
        log.log(Level.FINEST, () -> "Set wanted state of node " + this + " to " + wantedState + ".");
    }
Sets the wanted state. The wanted state is taken as UP if a null argument is given
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeInfo.java