private void setWantedNodeState(State newState, NodeType nodeType, int nodeIndex) {
        int rpcPort = fleetController().getRpcPort();
        Target connection = supervisor.connect(new Spec("localhost", rpcPort));
        assertTrue(connection.isValid());

        Node node = new Node(nodeType, nodeIndex);
        NodeState newNodeState = new NodeState(nodeType, newState);

        Request req = setNodeState("storage/cluster.mycluster/" + node.getType().toString() + "/" + node.getIndex(), newNodeState, connection);
        assertEquals(ErrorCode.NONE, req.errorCode(), req.toString());
        assertTrue(req.checkReturnTypes("s"), req.toString());
    }
Note: RpcServer is only used in unit tests

@author humbe
clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/RpcServerTest.java