Adds test code for generating a random but clamped set