Make a tests more robust to different seed

I tested it with seed from 1 to 5000 and they all pass.