ElasticsearchDependenciesJob { public static Builder builder() { return new Builder(); } ElasticsearchDependenciesJob(Builder builder); static Builder builder(); void run();  }
@Test public void javaSslOptsRedirected() { System.setProperty("javax.net.ssl.keyStore", "keystore.jks"); System.setProperty("javax.net.ssl.keyStorePassword", "superSecret"); System.setProperty("javax.net.ssl.trustStore", "truststore.jks"); System.setProperty("javax.net.ssl.trustStorePassword", "secretSuper"); ElasticsearchDependenciesJob job = ElasticsearchDependenciesJob.builder().build(); assertThat(job.conf.get("es.net.ssl.keystore.location")).isEqualTo("file:keystore.jks"); assertThat(job.conf.get("es.net.ssl.keystore.pass")).isEqualTo("superSecret"); assertThat(job.conf.get("es.net.ssl.truststore.location")).isEqualTo("file:truststore.jks"); assertThat(job.conf.get("es.net.ssl.truststore.pass")).isEqualTo("secretSuper"); System.clearProperty("javax.net.ssl.keyStore"); System.clearProperty("javax.net.ssl.keyStorePassword"); System.clearProperty("javax.net.ssl.trustStore"); System.clearProperty("javax.net.ssl.trustStorePassword"); }
@Test public void buildHttps() { ElasticsearchDependenciesJob job = ElasticsearchDependenciesJob.builder().hosts("https: assertThat(job.conf.get("es.nodes")).isEqualTo("foobar:443"); assertThat(job.conf.get("es.net.ssl")).isEqualTo("true"); }
@Test public void buildAuth() { ElasticsearchDependenciesJob job = ElasticsearchDependenciesJob.builder().username("foo").password("bar").build(); assertThat(job.conf.get("es.net.http.auth.user")).isEqualTo("foo"); assertThat(job.conf.get("es.net.http.auth.pass")).isEqualTo("bar"); }