Refactoring of test randomizing. Randomizer class.