fix bug and add junit test for zookeeper client