@Test
public void testSslConfFallback() throws Exception {

  Configuration conf = new Configuration(FAKE_SSL_CONFIG);
  // Set non-exist-ssl-client.xml that fails to load.
  // This triggers fallback to SSL config from input conf.
  conf.set(SSL_CLIENT_CONF_KEY, "non-exist-ssl-client.xml");
  Configuration sslConf = SSLFactory.readSSLConfiguration(conf, CLIENT);
  // Verify fallback to input conf when ssl conf can't be loaded from
  // classpath.
  String clientTsLoc = sslConf.get(getClientTrustStoreKeyName());
  assertEquals("trustStoreLocation", clientTsLoc);
  assertEquals(sslConf, conf);
}