@Test
    void testDontTagFailingSetSystemStateOk() throws Exception {
        FleetControllerOptions.Builder options = defaultOptions();
        setUpFleetController(timer, options);
        setUpVdsNodes(timer);
        waitForStableSystem();

        StateWaiter waiter = new StateWaiter(timer);
        fleetController().addSystemStateListener(waiter);

        nodes.get(1).failSetSystemState(true);
        int versionBeforeChange = nodes.get(1).getSystemStatesReceived().get(0).getVersion();
        nodes.get(2).disconnect(); // cause a new state
        waiter.waitForState("version:\\d+ distributor:10 .1.s:d storage:10", timeout());
        int versionAfterChange = waiter.getCurrentSystemState().getVersion();
        assertTrue(versionAfterChange > versionBeforeChange);
        fleetController().waitForNodesHavingSystemStateVersionEqualToOrAbove(versionAfterChange, 18, timeout());

        // Assert that the failed node has not acknowledged the latest version.
        // (The version may still be larger than versionBeforeChange if the fleet controller sends a
        // "stable system" update without timestamps in the meantime
        assertTrue(fleetController().getCluster().getNodeInfo(nodes.get(1).getNode()).getClusterStateVersionBundleAcknowledged() < versionAfterChange);

        // Ensure non-concurrent access to getNewestSystemStateVersionSent
        synchronized(timer) {
            int sentVersion = fleetController().getCluster().getNodeInfo(nodes.get(1).getNode()).getNewestSystemStateVersionSent();
            assertTrue(sentVersion == -1 || sentVersion == versionAfterChange);
        }
    }
Class for testing states of all nodes. Will fail in constructor with
debug message on non-expected results.
clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/StateChangeTest.java