Testing things that involve randomness