Added tests in random_test file.