server/src/test/java/org/elasticsearch/health/node/DiskHealthIndicatorServiceTests.java
+ (numberOfProblemNodes == 1 ? "is" : "are")
                    + " out of disk or running low on disk space."
            )
        );
        List<HealthIndicatorImpact> impacts = result.impacts();
        assertThat(impacts.size(), equalTo(2));
        assertThat(impacts.get(0).impactDescription(), equalTo("Cluster stability might be impaired."));
        assertThat(impacts.get(0).severity(), equalTo(1));
        assertThat(impacts.get(0).impactAreas(), equalTo(List.of(ImpactArea.DEPLOYMENT_MANAGEMENT)));
        assertThat(impacts.get(1).impactDescription(), equalTo("The [" + otherRole.roleName() + "] functionality might be impaired."));
        assertThat(impacts.get(1).severity(), equalTo(3));
        assertThat(impacts.get(1).impactAreas(), equalTo(List.of(ImpactArea.DEPLOYMENT_MANAGEMENT)));
        List<Diagnosis> diagnosisList = result.diagnosisList();
        assertThat(diagnosisList.size(), equalTo(1));
        Diagnosis diagnosis = diagnosisList.get(0);
        List<Diagnosis.Resource> affectedResources = diagnosis.affectedResources();
        assertThat(affectedResources.size(), equalTo(1));
        assertThat(affectedResources.get(0).getType(), is(Diagnosis.Resource.Type.NODE));
        assertThat(affectedResources.get(0).getNodes().size(), is(numberOfProblemNodes));
        Diagnosis.Definition diagnosisDefinition = diagnosis.definition();
        if (expectedStatus == HealthStatus.RED) {
            assertThat(diagnosisDefinition.cause(), equalTo("Disk is full."));
        } else {
            assertThat(diagnosisDefinition.cause(), equalTo("The cluster is running low on disk space."));
        }
        assertThat(
            diagnosisDefinition.action(),
            equalTo("Please add capacity to the current nodes, or replace them with ones with higher capacity.")
        );
    }