Added test to ensure randomness is ensured