Added test (unique) for random_key function