Generally, I would recommend avoiding the use of random numbers in unit tests, since it is important for us to know the inputs to a given test. Suppose a test fails for a certain number, how will be be able to repeat that failure if the number if randomly generated? This makes tests not repeatable.