Replaces instances of `tests[rand(tests.size)]`

with `tests.sample` for clarity.