@Override
  public Health checkNode() {
    return nodeHealthChecks.stream()
      .map(NodeHealthCheck::check)
      .reduce(Health.GREEN, HealthReducer::merge);
  }
@Test
  public void checkNode_returns_YELLOW_status_if_only_GREEN_and_at_least_one_YELLOW_statuses_returned_by_NodeHealthCheck() {
    List<Health.Status> statuses = new ArrayList<>();
    Stream.concat(
      IntStream.range(0, 1 + random.nextInt(20)).mapToObj(i -> YELLOW), // at least 1 YELLOW
      IntStream.range(0, random.nextInt(20)).mapToObj(i -> GREEN)).forEach(statuses::add); // between 0 and 19 GREEN
    Collections.shuffle(statuses);
    HealthCheckerImpl underTest = newNodeHealthCheckerImpl(statuses.stream());

    assertThat(underTest.checkNode().getStatus())
      .describedAs("%s should have been computed from %s statuses", YELLOW, statuses)
      .isEqualTo(YELLOW);
  }