Add unit test for create data function