Added logic for generation of test data.