The following ILM tests all contain switch statements with branches that will never execute. The tests use a `between(x, y)` switch expression, but there are `case` values that are outside the randomised range. We need to fix these before #88739 can be merged. By "fix", I mean either remove the spurious cases, or if we actually want them, then extend the randomized range.

   * ActionConfigStatsTests
   * AllocateActionTests
   * CopyExecutionStateStepTests
   * RolloverActionTests
   * WaitForRolloverReadyStepTests

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/AllocateActionTests.java
}
        assertThat(firstStep.getSettings(), equalTo(expectedSettings.build()));
        AllocationRoutedStep secondStep = (AllocationRoutedStep) steps.get(1);
        assertEquals(expectedSecondStepKey, secondStep.getKey());
        assertEquals(nextStepKey, secondStep.getNextStepKey());
    }
    public void testTotalNumberOfShards() throws Exception {
        Integer totalShardsPerNode = randomIntBetween(-1, 1000);
        Integer numberOfReplicas = randomIntBetween(0, 4);
        AllocateAction action = new AllocateAction(numberOfReplicas, totalShardsPerNode, null, null, null);
        String phase = randomAlphaOfLengthBetween(1, 10);
        StepKey nextStepKey = new StepKey(
            randomAlphaOfLengthBetween(1, 10),
            randomAlphaOfLengthBetween(1, 10),
            randomAlphaOfLengthBetween(1, 10)
        );
        List<Step> steps = action.toSteps(null, phase, nextStepKey);
        UpdateSettingsStep firstStep = (UpdateSettingsStep) steps.get(0);
        assertEquals(totalShardsPerNode, firstStep.getSettings().getAsInt(INDEX_TOTAL_SHARDS_PER_NODE_SETTING.getKey(), null));
        totalShardsPerNode = null;
        action = new AllocateAction(numberOfReplicas, totalShardsPerNode, null, null, null);
        steps = action.toSteps(null, phase, nextStepKey);
        firstStep = (UpdateSettingsStep) steps.get(0);
        assertEquals(null, firstStep.getSettings().get(INDEX_TOTAL_SHARDS_PER_NODE_SETTING.getKey()));
        
        action = new AllocateAction(null, 5, null, null, null);
        assertThat(action.getTotalShardsPerNode(), is(5));
    }
}