Test dataGenerator function