@Test public void test() throws Exception { try (EmbeddedElasticsearch5 elasticsearch = new EmbeddedElasticsearch5()) { SharedElasticsearchResource elasticsearchResource = new SharedElasticsearchResource(); CustomResourceSpecifier_impl esSpecifier = new CustomResourceSpecifier_impl(); esSpecifier.setParameters( new Parameter[] { new Parameter_impl(PARAM_CLUSTER, elasticsearch.getClusterName()), new Parameter_impl(PARAM_PORT, Integer.toString(elasticsearch.getTransportPort())) }); elasticsearchResource.initialize(esSpecifier, Maps.newHashMap()); assertNotNull(elasticsearchResource.getClient()); ClusterStatsResponse actionGet = elasticsearchResource .getClient() .admin() .cluster() .clusterStats(new ClusterStatsRequest()) .actionGet(); assertEquals(elasticsearch.getClusterName(), actionGet.getClusterName().value()); elasticsearchResource.destroy(); } }
public Client getClient() { return client; }
SharedElasticsearchResource extends BaleenResource { public Client getClient() { return client; } }
SharedElasticsearchResource extends BaleenResource { public Client getClient() { return client; }  }
SharedElasticsearchResource extends BaleenResource { public Client getClient() { return client; }  Client getClient(); }
SharedElasticsearchResource extends BaleenResource { public Client getClient() { return client; }  Client getClient(); static final String PARAM_HOST; static final String PARAM_PORT; static final String PARAM_CLUSTER; }