Create unit test for random generate function