add unit test for promise order