KentBeck/junit — pull request #584 by amejia1 (2012-12-24 02:16:45+00:00)
Title: Introduce new RANDOM Sorter

This new Sorter is useful for randomly shuffling tests in a Request class via the sortWith() method. The general usage would be
Request.classes(Class1.class, Class2.class, ..., ClassN.class).sortWith(Sorter.RANDOM.getComparator());

I find myself in need of randomly shuffling the test methods and classes to check that the tests do not depend on other tests. I could have implemented a Comparator which randomly outputs -1, or 1, but I wanted to perform an unbiased shuffle of the tests via Collections.shuffle(). I have not looked at the code for Collections.shuffle(), but I'm guessing it performs a Fisher-Yates shuffle.