@Override
  public NodeHealth get() {
    Health nodeHealth = healthChecker.checkNode();
    this.nodeHealthBuilder
      .clearCauses()
      .setStatus(NodeHealth.Status.valueOf(nodeHealth.getStatus().name()));
    nodeHealth.getCauses().forEach(this.nodeHealthBuilder::addCause);

    return this.nodeHealthBuilder
      .setDetails(nodeDetails)
      .build();
  }
@Test
  public void get_returns_host_from_property_if_set_at_constructor_time() {
    String host = randomAlphanumeric(4);
    mapSettings.setProperty(CLUSTER_NODE_NAME.getKey(), randomAlphanumeric(3));
    mapSettings.setProperty(CLUSTER_NODE_HZ_PORT.getKey(), 1 + random.nextInt(4));
    mapSettings.setProperty(CLUSTER_NODE_HOST.getKey(), host);
    setStartedAt();
    when(healthChecker.checkNode()).thenReturn(Health.builder()
      .setStatus(Health.Status.values()[random.nextInt(Health.Status.values().length)])
      .build());
    NodeHealthProviderImpl underTest = new NodeHealthProviderImpl(mapSettings.asConfig(), healthChecker, server, networkUtils);

    NodeHealth nodeHealth = underTest.get();

    assertThat(nodeHealth.getDetails().getHost()).isEqualTo(host);

    // change values in properties
    mapSettings.setProperty(CLUSTER_NODE_HOST.getKey(), randomAlphanumeric(66));

    NodeHealth newNodeHealth = underTest.get();

    assertThat(newNodeHealth.getDetails().getHost()).isEqualTo(host);
  }