Test random number generator