Added random functionality to Test class.