@Test
    void testNoSystemStateBeforeInitialTimePeriod() throws Exception {
        FleetControllerOptions.Builder builder = defaultOptions()
                .setMinTimeBeforeFirstSystemStateBroadcast(3 * 60 * 1000);
        setUpFleetController(timer, builder);
        setUpVdsNodes(timer, true);
        // Leave one node down to avoid sending cluster state due to having seen all node states.
        for (int i = 0; i < nodes.size(); ++i) {
            if (i != 3) {
                nodes.get(i).connect();
            }
        }

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

        // Ensure all nodes have been seen by fleetcontroller and that it has had enough time to possibly have sent a cluster state
        // Note: this is a candidate state and therefore NOT versioned yet
        waiter.waitForState("^distributor:10 (\\.\\d+\\.t:\\d+ )*storage:10 (\\.\\d+\\.t:\\d+ )*.1.s:d( \\.\\d+\\.t:\\d+)*", timeout());
        waitForCompleteCycle();
        new StateMessageChecker(nodes) {
            @Override
            int expectedMessageCount(final DummyVdsNode node) {
                return 0;
            }
        };

        // Pass time and see that the nodes get state
        timer.advanceTime(3 * 60 * 1000);
        waiter.waitForState("version:\\d+ distributor:10 storage:10 .1.s:d", timeout());

        int version = waiter.getCurrentSystemState().getVersion();
        fleetController().waitForNodesHavingSystemStateVersionEqualToOrAbove(version, 19, timeout());

        new StateMessageChecker(nodes) {
            @Override
            int expectedMessageCount(final DummyVdsNode node) {
                return node.getNode().equals(new Node(NodeType.STORAGE, 1)) ? 0 : 2;
            }
        };
        assertEquals(version, waiter.getCurrentSystemState().getVersion());
    }
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