Add random number generator for tests

Signed-off-by: Sandeep Patil <sandep@lab126.com>