Added randomized test.