I have a function which takes in two parameters, and returns one or the other 50% of the time.
The unit test for this should determine that both parameters could be
If the randomness is based on a random number generator that it calls, you can rig up a stub random() function that returns various results to give you your expected outputs.