Moved random iterator to test module.