added mocha tests and sample data generation