Added test for randomgenerator