add test cases on using promise