@Test public void testSSLKeyAndTrustStoreSettingsOnly() throws Exception { final String trustStoreFile = "/a/b/c/truststore.jks"; final String trustStorePassword = "averysecretpassword"; final String keyStoreFile = "/a/b/c/keystore.jks"; final String keyStorePassword = "key_store_password"; final String keyPassword = "key_password"; final SSLConfigurationCallback.Builder sslConfBuilderMock = sslSettingsTestBase( ImmutableMap.<String, String>builder(). put("index." + INDEX_NAME + ".elasticsearch.ssl.truststore.location", trustStoreFile). put("index." + INDEX_NAME + ".elasticsearch.ssl.truststore.password", trustStorePassword). put("index." + INDEX_NAME + ".elasticsearch.ssl.keystore.location", keyStoreFile). put("index." + INDEX_NAME + ".elasticsearch.ssl.keystore.storepassword", keyStorePassword). put("index." + INDEX_NAME + ".elasticsearch.ssl.keystore.keypassword", keyPassword). build() ); verify(restClientSetup).getSSLConfigurationCallbackBuilder(); verify(sslConfBuilderMock).withTrustStore(eq(trustStoreFile), eq(trustStorePassword)); verify(sslConfBuilderMock).withKeyStore(eq(keyStoreFile), eq(keyStorePassword), eq(keyPassword)); verify(sslConfBuilderMock).build(); verifyNoMoreInteractions(sslConfBuilderMock); }
protected SSLConfigurationCallback.Builder getSSLConfigurationCallbackBuilder() { return SSLConfigurationCallback.Builder.create(); }
RestClientSetup { protected SSLConfigurationCallback.Builder getSSLConfigurationCallbackBuilder() { return SSLConfigurationCallback.Builder.create(); } }
RestClientSetup { protected SSLConfigurationCallback.Builder getSSLConfigurationCallbackBuilder() { return SSLConfigurationCallback.Builder.create(); }  }
RestClientSetup { protected SSLConfigurationCallback.Builder getSSLConfigurationCallbackBuilder() { return SSLConfigurationCallback.Builder.create(); }  ElasticSearchClient connect(Configuration config); }
RestClientSetup { protected SSLConfigurationCallback.Builder getSSLConfigurationCallbackBuilder() { return SSLConfigurationCallback.Builder.create(); }  ElasticSearchClient connect(Configuration config);  }