String connectString = server.getConnectString();
CuratorFramework client = CuratorFrameworkFactory.newClient(connectString, 50, 50, new NoRetryPolicy());
try {
client.start();
client.blockUntilConnected(30, SECONDS);
String basePath = "/test";
setDataInZookeperServer(client, basePath, "thanks", "welcome");
setDataInZookeperServer(client, basePath, "greetings", "hi,bonjour,hiya,hi!");
} finally {
client.close();