### CI Link

https://gradle-enterprise.elastic.co/s/dvtf7swsnm44o

### Repro line

./gradlew ':x-pack:plugin:autoscaling:test' --tests "org.elasticsearch.xpack.autoscaling.capacity.AutoscalingCalculateCapacityServiceTests.testContext" -Dtests.seed=15E8E10F966ECA7A -Dtests.locale=be-BY -Dtests.timezone=America/Noronha -Druntime.java=17	

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=Europe/Rome&tests.container=org.elasticsearch.xpack.autoscaling.capacity.AutoscalingCalculateCapacityServiceTests&tests.test=testContext

### Failure excerpt

```
org.elasticsearch.xpack.autoscaling.capacity.AutoscalingCalculateCapacityServiceTests > testContext FAILED
    java.lang.NullPointerException: Cannot invoke "org.elasticsearch.xpack.autoscaling.capacity.AutoscalingCapacity.node()" because the return value of "org.elasticsearch.xpack.autoscaling.capacity.AutoscalingDeciderContext.currentCapacity()" is null
        at __randomizedtesting.SeedInfo.seed([EB0EF2643F2D6C41:7D3B02C92A094B8F]:0)
        at org.elasticsearch.xpack.autoscaling.capacity.AutoscalingCalculateCapacityServiceTests.testContext(AutoscalingCalculateCapacityServiceTests.java:225)
```
x-pack/plugin/autoscaling/src/test/java/org/elasticsearch/xpack/autoscaling/capacity/AutoscalingCalculateCapacityServiceTests.java
assertThat(deciders.size(), equalTo(1));
            Settings configuration = deciders.values().iterator().next();
            AutoscalingCapacity requiredCapacity = calculateFixedDeciderCapacity(configuration);
            assertThat(results.requiredCapacity(), equalTo(requiredCapacity));
            assertThat(results.results().size(), equalTo(1));
            AutoscalingDeciderResult deciderResult = results.results().get(deciders.firstKey());
            assertNotNull(deciderResult);
            assertThat(deciderResult.requiredCapacity(), equalTo(requiredCapacity));
            ByteSizeValue storage = configuration.getAsBytesSize(FixedAutoscalingDeciderService.STORAGE.getKey(), null);
            ByteSizeValue memory = configuration.getAsMemory(FixedAutoscalingDeciderService.MEMORY.getKey(), null);
            Double processors = configuration.getAsDouble(FixedAutoscalingDeciderService.PROCESSORS.getKey(), null);
            int nodes = FixedAutoscalingDeciderService.NODES.get(configuration);
            assertThat(
                deciderResult.reason(),
                equalTo(new FixedAutoscalingDeciderService.FixedReason(storage, memory, nodes, Processors.of(processors)))
            );
            assertThat(
                deciderResult.reason().summary(),
                equalTo("fixed storage [" + storage + "] memory [" + memory + "] processors [" + processors + "] nodes [" + nodes + "]")
            );
            
            assertThat(results.currentCapacity(), equalTo(AutoscalingCapacity.ZERO));
            assertThat(results.currentNodes(), equalTo(Collections.emptySortedSet()));
        }
    }
    public void testDefaultDeciders() {
        FixedAutoscalingDeciderService defaultOn = new FixedAutoscalingDeciderService() {
            @Override
            public boolean defaultOn() {
                return true;