@Override
  public Optional<String> getLeaderHostName() {
    UUID leaderUuid = (UUID) hzMember.getAtomicReference(LEADER).get();
    if (leaderUuid != null) {
      Optional<Member> leader = hzMember.getCluster().getMembers().stream().filter(m -> m.getUuid().equals(leaderUuid)).findFirst();
      if (leader.isPresent()) {
        return Optional.of(leader.get().getAddress().getHost());
      }
    }
    return Optional.empty();
  }
@Test
  public void return_null_if_node_is_not_leader() {
    try (ClusterAppStateImpl underTest = createClusterAppState()) {
      Optional<String> hostname = underTest.getLeaderHostName();
      assertThat(hostname).isEmpty();
    }
  }