// call ls and put result in byteStream
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
PrintStream out = new PrintStream(byteStream);
String lsCmd = "ls /";
LsCommand entity = new LsCommand();
entity.setZk(zk);
entity.setOut(out);
entity.parse(lsCmd.split(" ")).exec();
String result = byteStream.toString();
assertTrue(result, result.contains("[aa1, aa2, aa3, test1, zk1, zookeeper]"));
}