tool.addStateModelDef(clusterName, "MasterSlave", new StateModelDefinition(
StateModelConfigGenerator.generateConfigForMasterSlave()));
tool.addResource(clusterName, "test-db", 4, "MasterSlave");
Map<String, String> resourceConfig = new HashMap<String, String>();
resourceConfig.put("key1", "value1");
tool.setConfig(new HelixConfigScopeBuilder(ConfigScopeProperty.RESOURCE)
.forCluster(clusterName).forResource("test-db").build(), resourceConfig);
PropertyKey.Builder keyBuilder = new PropertyKey.Builder(clusterName);
Assert.assertTrue(_gZkClient.exists(keyBuilder.idealStates("test-db").getPath()),
"test-db ideal-state should exist");