Verify correctness of random fruit query

Verify that the correct number of results is found when running random
fruit queries.  Refactored code to be a tad cleaner.