@Test
    void storage_node_in_init_mode_while_listing_buckets_is_marked_down() {
        final NodeState initWhileListingBuckets = new NodeState(NodeType.STORAGE, State.INITIALIZING);
        initWhileListingBuckets.setInitProgress(0.0f);

        final ClusterFixture fixture = ClusterFixture.forFlatCluster(3)
                .bringEntireClusterUp()
                .reportStorageNodeState(1, initWhileListingBuckets);

        final AnnotatedClusterState state = generateFromFixtureWithDefaultParams(fixture);
        assertThat(state.toString(), equalTo("distributor:3 storage:3 .1.s:d"));
    }
A storage node will report itself as being in initializing mode immediately when
starting up. It can only accept external operations once it has finished listing
the set of buckets (but not necessarily their contents). As a consequence of this,
we have to map reported init state while bucket listing mode to Down. This will
prevent clients from thinking they can use the node and prevent distributors form
trying to fetch yet non-existent bucket sets from it.

Detecting the bucket-listing stage is currently done by inspecting its init progress
value and triggering on a sufficiently low value.
clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ClusterStateGeneratorTest.java