tests for ConstantRand