@Override
  public Set<NodeHealth> readAll() {
    long clusterTime = hzMember.getClusterTime();
    long timeout = clusterTime - TIMEOUT_30_SECONDS;
    Map<UUID, TimestampedNodeHealth> sqHealthState = readReplicatedMap();
    Set<UUID> hzMemberUUIDs = hzMember.getMemberUuids();
    Set<NodeHealth> existingNodeHealths = sqHealthState.entrySet().stream()
      .filter(outOfDate(timeout))
      .filter(ofNonExistentMember(hzMemberUUIDs))
      .map(entry -> entry.getValue().getNodeHealth())
      .collect(Collectors.toSet());
    if (LOG.isTraceEnabled()) {
      LOG.trace("Reading {} and keeping {}", new HashMap<>(sqHealthState), existingNodeHealths);
    }
    return ImmutableSet.copyOf(existingNodeHealths);
  }
@Test
  public void readAll_logs_message_for_each_non_existing_member_ignored_if_TRACE() {
    logging.setLevel(Level.TRACE);
    Map<String, TimestampedNodeHealth> map = new HashMap<>();
    String memberUuid1 = randomAlphanumeric(44);
    String memberUuid2 = randomAlphanumeric(44);
    map.put(memberUuid1, new TimestampedNodeHealth(randomNodeHealth(), clusterTime - 1));
    map.put(memberUuid2, new TimestampedNodeHealth(randomNodeHealth(), clusterTime - 1));
    when(hazelcastMember.getClusterTime()).thenReturn(clusterTime);
    doReturn(map).when(hazelcastMember).getReplicatedMap(MAP_SQ_HEALTH_STATE);

    underTest.readAll();

    assertThat(logging.getLogs()).hasSize(3);
    assertThat(logging.getLogs(Level.TRACE))
      .containsOnly(
        "Reading " + new HashMap<>(map) + " and keeping []",
        "Ignoring NodeHealth of member " + memberUuid1 + " because it is not part of the cluster at the moment",
        "Ignoring NodeHealth of member " + memberUuid2 + " because it is not part of the cluster at the moment");
  }