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 path_properties_are_values_from_EsFileSystem_argument() throws IOException {
    File foo = temp.newFolder();
    EsInstallation mockedEsInstallation = mock(EsInstallation.class);
    File home = new File(foo, "home");
    when(mockedEsInstallation.getHomeDirectory()).thenReturn(home);
    File conf = new File(foo, "conf");
    when(mockedEsInstallation.getConfDirectory()).thenReturn(conf);
    File log = new File(foo, "log");
    when(mockedEsInstallation.getLogDirectory()).thenReturn(log);
    File data = new File(foo, "data");
    when(mockedEsInstallation.getDataDirectory()).thenReturn(data);

    EsSettings underTest = new EsSettings(minProps(true), mockedEsInstallation, system);

    Map<String, String> generated = underTest.build();
    assertThat(generated)
      .containsEntry("path.data", data.getPath())
      .containsEntry("path.logs", log.getPath());
    assertThat(generated.get("path.conf")).isNull();
  }