} catch (PropertyStoreException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
DataAccessor accessor = new FileDataAccessor(store, clusterName);
InstanceConfig config = new InstanceConfig("id0");
accessor.setProperty(PropertyType.CONFIGS, config, ConfigScopeProperty.PARTICIPANT.toString(),
"key0");
config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
ConfigScopeProperty.PARTICIPANT.toString(), "key0");
AssertJUnit.assertEquals("id0", config.getId());
InstanceConfig newConfig = new InstanceConfig("id1");
accessor.updateProperty(PropertyType.CONFIGS, newConfig,
ConfigScopeProperty.PARTICIPANT.toString(),
"key0");
config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
ConfigScopeProperty.PARTICIPANT.toString(), "key0");
AssertJUnit.assertEquals("id1", config.getId());
accessor.removeProperty(PropertyType.CONFIGS, ConfigScopeProperty.PARTICIPANT.toString(),
"key0");
config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
ConfigScopeProperty.PARTICIPANT.toString(), "key0");
AssertJUnit.assertNull(config);
LiveInstance leader = new LiveInstance("id2");
accessor.updateProperty(PropertyType.LEADER, leader);
LiveInstance nullLeader = accessor.getProperty(LiveInstance.class, PropertyType.LEADER);
AssertJUnit.assertNull(nullLeader);
accessor.setProperty(PropertyType.LEADER, leader);
LiveInstance newLeader = new LiveInstance("id3");
accessor.updateProperty(PropertyType.LEADER, newLeader);
leader = accessor.getProperty(LiveInstance.class, PropertyType.LEADER);
AssertJUnit.assertEquals("id3", leader.getId());
// List<ZNRecord> childs = accessor.getChildValues(PropertyType.HISTORY);
// AssertJUnit.assertEquals(childs.size(), 0);