Added test for rejecting returned promises