}
@Test
public void testSetZooKeeperInstance() {
Configuration conf = new Configuration();
ConfiguratorBase.setZooKeeperInstance(this.getClass(), conf, new ClientConfiguration().withInstance("testInstanceName").withZkHosts("testZooKeepers")
.withSsl(true).withZkTimeout(1234));
ClientConfiguration clientConf = ClientConfiguration.deserialize(conf.get(ConfiguratorBase.enumToConfKey(this.getClass(),
ConfiguratorBase.InstanceOpts.CLIENT_CONFIG)));
assertEquals("testInstanceName", clientConf.get(ClientProperty.INSTANCE_NAME));
assertEquals("testZooKeepers", clientConf.get(ClientProperty.INSTANCE_ZK_HOST));
assertEquals("true", clientConf.get(ClientProperty.INSTANCE_RPC_SSL_ENABLED));
assertEquals("1234", clientConf.get(ClientProperty.INSTANCE_ZK_TIMEOUT));
assertEquals(ZooKeeperInstance.class.getSimpleName(), conf.get(ConfiguratorBase.enumToConfKey(this.getClass(), ConfiguratorBase.InstanceOpts.TYPE)));
Instance instance = ConfiguratorBase.getInstance(this.getClass(), conf);
assertEquals(ZooKeeperInstance.class.getName(), instance.getClass().getName());
assertEquals("testInstanceName", ((ZooKeeperInstance) instance).getInstanceName());