use of com.baidu.disconf.core.test.zookeeper.mock.ResilientActiveKeyValueStoreMock in project disconf by knightliao.
the class ZookeeperMgrTest method testGetRootChildren.
/**
* 测试获取Root子节点
*/
@Test
public final void testGetRootChildren() {
final ZookeeperMgr obj = ZookeeperMgr.getInstance();
//
// 注入
//
new NonStrictExpectations(obj) {
{
ResilientActiveKeyValueStore store = new ResilientActiveKeyValueStoreMock();
this.setField(obj, "store", store);
}
};
List<String> list = ZookeeperMgr.getInstance().getRootChildren();
for (String item : list) {
System.out.println(item);
}
Assert.assertTrue(list.size() > 0);
}
Aggregations