@Test
    void testGetNodeStateWithConfiguredRetired() throws Exception {
        List<ConfiguredNode> configuredNodes = new ArrayList<>();
        for (int i = 0; i < 4; i++)
            configuredNodes.add(new ConfiguredNode(i, false));
        configuredNodes.add(new ConfiguredNode(4, true)); // Last node is configured retired
        FleetControllerOptions.Builder builder = defaultOptions(configuredNodes)
                .setMinRatioOfStorageNodesUp(0)
                .setMaxInitProgressTime(30000)
                .setStableStateTimePeriod(60000);
        setUpFleetController(timer, builder);
        setUpVdsNodes(timer, false, configuredNodes);
        waitForState("version:\\d+ distributor:5 storage:5 .4.s:r");

        setWantedNodeState(State.DOWN, NodeType.DISTRIBUTOR, 2);
        setWantedNodeState(State.RETIRED, NodeType.STORAGE, 2);
        setWantedNodeState(State.MAINTENANCE, NodeType.STORAGE, 3);
        waitForCompleteCycle();
        timer.advanceTime(1000000);
        waitForCompleteCycle(); // Make fleet controller notice that time has changed before any disconnects
        nodes.get(0).disconnect();
        nodes.get(3).disconnect();
        nodes.get(5).disconnect();
        waitForState("version:\\d+ distributor:5 .0.s:d .2.s:d storage:5 .1.s:m .2.s:m .3.s:m .4.s:r");
        timer.advanceTime(1000000);
        waitForState("version:\\d+ distributor:5 .0.s:d .2.s:d storage:5 .1.s:d .2.s:d .3.s:m .4.s:r");
        timer.advanceTime(1000000);
        waitForCompleteCycle(); // Make fleet controller notice that time has changed before any disconnects
        nodes.get(3).setNodeState(new NodeState(nodes.get(3).getType(), State.INITIALIZING).setInitProgress(0.2f));
        nodes.get(3).connect();
        waitForState("version:\\d+ distributor:5 .0.s:d .2.s:d storage:5 .1.s:i .1.i:0.2 .2.s:d .3.s:m .4.s:r");
    }
Note: RpcServer is only used in unit tests

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