server/src/test/java/org/elasticsearch/health/node/DiskHealthIndicatorServiceTests.java
assertThat(impacts.get(0).impactDescription(), containsString("Cannot insert or update documents in the affected indices ["));
        assertThat(impacts.get(0).severity(), equalTo(1));
        assertThat(impacts.get(0).impactAreas(), equalTo(List.of(ImpactArea.INGEST)));
        assertThat(impacts.get(1).impactDescription(), equalTo("Cluster stability might be impaired."));
        assertThat(impacts.get(1).severity(), equalTo(1));
        assertThat(impacts.get(1).impactAreas(), equalTo(List.of(ImpactArea.DEPLOYMENT_MANAGEMENT)));
        assertThat(
            impacts.get(2).impactDescription(),
            equalTo("The " + otherRoles.stream().map(DiscoveryNodeRole::roleName).sorted().toList() + " functionality might be impaired.")
        );
        assertThat(impacts.get(2).severity(), equalTo(3));
        assertThat(impacts.get(2).impactAreas(), equalTo(List.of(ImpactArea.DEPLOYMENT_MANAGEMENT)));
        List<Diagnosis> diagnosisList = result.diagnosisList();
        assertThat(diagnosisList.size(), equalTo(3));
        {
            Diagnosis diagnosis = diagnosisList.get(0);
            List<Diagnosis.Resource> dataAffectedResources = diagnosis.affectedResources();
            assertThat(dataAffectedResources.size(), equalTo(2));
            assertThat(dataAffectedResources.get(0).getType(), is(Diagnosis.Resource.Type.NODE));
            assertThat(dataAffectedResources.get(0).getNodes().size(), is(numberOfYellowDataNodes));
            assertThat(dataAffectedResources.get(1).getType(), is(Diagnosis.Resource.Type.INDEX));
            assertThat(dataAffectedResources.get(1).getValues().size(), is(1));
            Diagnosis.Definition dataDiagnosisDefinition = diagnosis.definition();
            assertThat(
                dataDiagnosisDefinition.cause(),
                equalTo(
                    "1 index resides on nodes that have run or are likely to run out of disk space, "
                        + "this can temporarily disable writing on this index."
                )
            );