public Collection<NodeInfo> load() throws InterruptedException {
    Map<String, NodeInfo> nodesByName = new HashMap<>();
    MemberSelector memberSelector = HazelcastMemberSelectors.selectorForProcessIds(ProcessId.WEB_SERVER, ProcessId.COMPUTE_ENGINE);
    DistributedAnswer<ProtobufSystemInfo.SystemInfo> distributedAnswer = hzMember.call(ProcessInfoProvider::provide, memberSelector, DISTRIBUTED_TIMEOUT_MS);
    for (Member member : distributedAnswer.getMembers()) {
      String nodeName = member.getAttribute(NODE_NAME.getKey());
      NodeInfo nodeInfo = nodesByName.computeIfAbsent(nodeName, name -> {
        NodeInfo info = new NodeInfo(name);
        info.setHost(member.getAddress().getHost());
        return info;
      });
      completeNodeInfo(distributedAnswer, member, nodeInfo);
    }
    return nodesByName.values();
  }
@Test
  public void load_info_from_all_nodes() throws Exception {
    DistributedAnswer<SystemInfo> answer = new DistributedAnswer<>();
    answer.setAnswer(newMember("foo"), SystemInfo.newBuilder().addSections(Section.newBuilder().build()).build());
    answer.setTimedOut(newMember("bar"));
    answer.setFailed(newMember("baz"), new IOException("BOOM"));
    when(hzMember.call(any(DistributedCall.class), any(MemberSelector.class), anyLong())).thenReturn(answer);

    Collection<NodeInfo> nodes = underTest.load();

    assertThat(nodes).hasSize(3);

    NodeInfo successfulNodeInfo = findNode(nodes, "foo");
    assertThat(successfulNodeInfo.getName()).isEqualTo("foo");
    assertThat(successfulNodeInfo.getHost()).hasValue(AN_ADDRESS.getHostAddress());
    assertThat(successfulNodeInfo.getErrorMessage()).isEmpty();
    assertThat(successfulNodeInfo.getSections()).hasSize(1);

    NodeInfo timedOutNodeInfo = findNode(nodes, "bar");
    assertThat(timedOutNodeInfo.getName()).isEqualTo("bar");
    assertThat(timedOutNodeInfo.getErrorMessage()).hasValue("Failed to retrieve information on time");
    assertThat(timedOutNodeInfo.getSections()).isEmpty();

    NodeInfo failedNodeInfo = findNode(nodes, "baz");
    assertThat(failedNodeInfo.getName()).isEqualTo("baz");
    assertThat(failedNodeInfo.getErrorMessage()).hasValue("Failed to retrieve information: BOOM");
    assertThat(failedNodeInfo.getSections()).isEmpty();
  }