During the development and review process of the disk health indicator we noticed that it was hard to understand. Since we learnt a lot from the first round of development we want to go through the code one more time and restructure it.
server/src/test/java/org/elasticsearch/health/node/DiskHealthIndicatorServiceTests.java
impacts.get(2).impactDescription(),
            equalTo(
                "The "
                    + nonDataNonMasterRoles.stream().map(DiscoveryNodeRole::roleName).sorted().toList()
                    + " functionality might be impaired."
            )
        );
        assertThat(impacts.get(2).severity(), equalTo(2));
        assertThat(impacts.get(2).impactAreas(), equalTo(List.of(ImpactArea.DEPLOYMENT_MANAGEMENT)));
        List<Diagnosis> diagnosisList = result.diagnosisList();
        assertThat(diagnosisList.size(), equalTo(3));
        Diagnosis dataDiagnosis = diagnosisList.get(0);
        List<String> dataAffectedResources = dataDiagnosis.affectedResources();
        assertThat(dataAffectedResources.size(), equalTo(numberOfYellowDataNodes));
        Diagnosis.Definition dataDiagnosisDefinition = dataDiagnosis.definition();
        assertThat(
            dataDiagnosisDefinition.cause(),
            equalTo("1 index resides on nodes that have run out of space and writing has been blocked by the system.")
        );
        assertThat(
            dataDiagnosisDefinition.action(),
            equalTo(
                "Enable autoscaling (if applicable), add disk capacity or free up disk space to resolve this. If you have already "
                    + "taken action please wait for the rebalancing to complete."
            )
        );
        Diagnosis masterDiagnosis = diagnosisList.get(1);
        List<String> masterAffectedResources = masterDiagnosis.affectedResources();
        assertThat(masterAffectedResources.size(), equalTo(numberOfRedMasterNodes));
        Diagnosis.Definition masterDiagnosisDefinition = masterDiagnosis.definition();