Added tests for random sorting.