@Override
  public Optional<String> getNodeName() {
    return Optional.ofNullable(nodeName);
  }
@Test
  public void getNodeName_whenClusterAndNameNotDefined_fallbacksToDefaultName() {
    settings.setProperty("sonar.cluster.enabled", "true");
    settings.removeProperty("sonar.cluster.node.name");

    DefaultNodeInformation underTest = new DefaultNodeInformation(settings.asConfig());

    assertThat(underTest.getNodeName()).isNotEmpty();
    String nodeNameFirstCallToGetNodeName = underTest.getNodeName().get();
    assertThat(nodeNameFirstCallToGetNodeName).startsWith("sonarqube-");
    String nodeNameSecondCallToGetNodeName = underTest.getNodeName().get();
    assertThat(nodeNameFirstCallToGetNodeName).isEqualTo(nodeNameSecondCallToGetNodeName);
  }