add test case for random, fix a bug of random node.