The following aggregation 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.

   * InternalAutoDateHistogramTests
   * InternalAvgTests
   * InternalDerivativeTests
   * InternalGeoCentroidTests
   * InternalWeightedAvgTests
   * SignificantLongTermsTests
   * SignificantStringTermsTests
server/src/test/java/org/elasticsearch/search/aggregations/bucket/terms/SignificantLongTermsTests.java
case 5 -> {
                    buckets = new ArrayList<>(buckets);
                    buckets.add(
                        new SignificantLongTerms.Bucket(
                            randomLong(),
                            randomNonNegativeLong(),
                            randomNonNegativeLong(),
                            randomNonNegativeLong(),
                            randomNonNegativeLong(),
                            InternalAggregations.EMPTY,
                            format,
                            0
                        )
                    );
                }
                case 8 -> {
                    if (metadata == null) {
                        metadata = Maps.newMapWithExpectedSize(1);
                    } else {
                        metadata = new HashMap<>(instance.getMetadata());
                    }
                    metadata.put(randomAlphaOfLength(15), randomInt());
                }
                default -> throw new AssertionError("Illegal randomisation branch");
            }
            return new SignificantLongTerms(
                name,
                requiredSize,
                minDocCount,
                metadata,