Add unit test for chained promises.