public Result calculateEffectOfNewState(
            Node node, ClusterState clusterState, SetUnitStateRequest.Condition condition,
            NodeState oldState, NodeState newState, boolean inMoratorium) {

        NodeStateChangeChecker nodeStateChangeChecker = new NodeStateChangeChecker(this, inMoratorium);
        return nodeStateChangeChecker.evaluateTransition(node, clusterState, condition, oldState, newState);
    }
Checks if a node can be upgraded

@param node the node to be checked for upgrad
@param clusterState the current cluster state version
@param condition the upgrade condition
@param oldState the old/current wanted state
@param newState state wanted to be set
@param inMoratorium whether the CC is in moratorium
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java