public Set<Integer> nodesThatShouldBeDown(ClusterState state) {
        return calculate(state).nodesThatShouldBeDown();
    }
@Test
    void non_uniform_group_sizes_are_supported() {
        GroupAvailabilityCalculator calc = calcForHierarchicCluster(
                DistributionBuilder.withGroupNodes(1, 2, 3, 4), 0.67);

        assertThat(calc.nodesThatShouldBeDown(clusterState(
                "distributor:10 storage:10")), equalTo(emptySet()));
        // Group 0 has only 1 node and should not cause any other nodes to be taken down
        assertThat(calc.nodesThatShouldBeDown(clusterState(
                "distributor:10 storage:10 .0.s:d")), equalTo(emptySet()));
        // Too little availability in group 1
        assertThat(calc.nodesThatShouldBeDown(clusterState(
                "distributor:10 storage:10 .1.s:d")), equalTo(indices(2)));
        // Too little availability in group 2
        assertThat(calc.nodesThatShouldBeDown(clusterState(
                "distributor:10 storage:10 .3.s:d")), equalTo(indices(4, 5)));
        // Group 4 has 75% availability (>= 67%), so no auto take-down there
        assertThat(calc.nodesThatShouldBeDown(clusterState(
                "distributor:10 storage:10 .7.s:d")), equalTo(emptySet()));
        // Drop group 4 availability to 50%; it should now be taken down entirely
        assertThat(calc.nodesThatShouldBeDown(clusterState(
                "distributor:10 storage:9 .7.s:d")), equalTo(indices(6, 8)));
    }