@Test public void testConnectBasicHttpConfigurationMultiHost() throws Exception { final List<HttpHost[]> hostsConfigured = baseHostsConfigTest(ImmutableMap.<String, String>builder(). put("index." + INDEX_NAME + ".hostname", ES_HOST_01 + "," + ES_HOST_02). build()); assertNotNull(hostsConfigured); assertEquals(1, hostsConfigured.size()); final HttpHost host0 = hostsConfigured.get(0)[0]; assertEquals(ES_HOST_01, host0.getHostName()); assertEquals(SCHEME_HTTP, host0.getSchemeName()); assertEquals(ElasticSearchIndex.HOST_PORT_DEFAULT, host0.getPort()); final HttpHost host1 = hostsConfigured.get(0)[1]; assertEquals(ES_HOST_02, host1.getHostName()); assertEquals(SCHEME_HTTP, host1.getSchemeName()); assertEquals(ElasticSearchIndex.HOST_PORT_DEFAULT, host1.getPort()); verify(restClientSetup).getElasticSearchClient(same(restClientMock), scrollKACaptor.capture(), anyBoolean()); assertEquals(ElasticSearchIndex.ES_SCROLL_KEEP_ALIVE.getDefaultValue().intValue(), scrollKACaptor.getValue().intValue()); verify(restElasticSearchClientMock, never()).setBulkRefresh(anyString()); }
protected RestElasticSearchClient getElasticSearchClient(RestClient rc, int scrollKeepAlive, boolean useMappingTypesForES7) { return new RestElasticSearchClient(rc, scrollKeepAlive, useMappingTypesForES7); }
RestClientSetup { protected RestElasticSearchClient getElasticSearchClient(RestClient rc, int scrollKeepAlive, boolean useMappingTypesForES7) { return new RestElasticSearchClient(rc, scrollKeepAlive, useMappingTypesForES7); } }
RestClientSetup { protected RestElasticSearchClient getElasticSearchClient(RestClient rc, int scrollKeepAlive, boolean useMappingTypesForES7) { return new RestElasticSearchClient(rc, scrollKeepAlive, useMappingTypesForES7); }  }
RestClientSetup { protected RestElasticSearchClient getElasticSearchClient(RestClient rc, int scrollKeepAlive, boolean useMappingTypesForES7) { return new RestElasticSearchClient(rc, scrollKeepAlive, useMappingTypesForES7); }  ElasticSearchClient connect(Configuration config); }
RestClientSetup { protected RestElasticSearchClient getElasticSearchClient(RestClient rc, int scrollKeepAlive, boolean useMappingTypesForES7) { return new RestElasticSearchClient(rc, scrollKeepAlive, useMappingTypesForES7); }  ElasticSearchClient connect(Configuration config);  }