public Map<String, String> build() {
    Map<String, String> builder = new HashMap<>();
    configureFileSystem(builder);
    configureNetwork(builder);
    configureCluster(builder);
    configureSecurity(builder);
    configureOthers(builder);
    LOGGER.info("Elasticsearch listening on [HTTP: {}:{}, TCP: {}:{}]",
      builder.get(ES_HTTP_HOST_KEY), builder.get(ES_HTTP_PORT_KEY),
      builder.get(ES_TRANSPORT_HOST_KEY), builder.get(ES_TRANSPORT_PORT_KEY));
    return builder;
  }
@Test
  public void test_default_settings_for_standalone_mode() throws Exception {
    File homeDir = temp.newFolder();
    Props props = new Props(new Properties());
    props.set(SEARCH_PORT.getKey(), "1234");
    props.set(ES_PORT.getKey(), "5678");
    props.set(SEARCH_HOST.getKey(), "127.0.0.1");
    props.set(PATH_HOME.getKey(), homeDir.getAbsolutePath());
    props.set(PATH_DATA.getKey(), temp.newFolder().getAbsolutePath());
    props.set(PATH_TEMP.getKey(), temp.newFolder().getAbsolutePath());
    props.set(PATH_LOGS.getKey(), temp.newFolder().getAbsolutePath());
    props.set(CLUSTER_NAME.getKey(), "sonarqube");

    EsSettings esSettings = new EsSettings(props, new EsInstallation(props), system);

    Map<String, String> generated = esSettings.build();

    assertThat(generated).containsEntry("transport.port", "5678")
      .containsEntry("transport.host", "127.0.0.1")
      .containsEntry("http.port", "1234")
      .containsEntry("http.host", "127.0.0.1")
      // no cluster, but cluster and node names are set though
      .containsEntry("cluster.name", "sonarqube")
      .containsEntry("node.name", "sonarqube")
      .containsEntry("discovery.type", "single-node")
      .doesNotContainKey("discovery.seed_hosts")
      .doesNotContainKey("cluster.initial_master_nodes");

    assertThat(generated.get("path.data")).isNotNull();
    assertThat(generated.get("path.logs")).isNotNull();
    assertThat(generated.get("path.home")).isNull();
    assertThat(generated.get("path.conf")).isNull();

    assertThat(generated)
      .containsEntry("discovery.initial_state_timeout", "30s")
      .containsEntry("action.auto_create_index", "false");
  }