             let initialPromise = Promise<Int>(error: TestHelpers.uniqueError())
             let expectedValue = 1000
 
-            var transformWasRun = false
+            let transformCalled = expectationWithDescription("Transform was called")
             let promise = initialPromise.recover { error in
-                transformWasRun = true
+                transformCalled.fulfill()
                 return Promise(value: expectedValue)
             }
 
-            var completionWasRun = false
-            promise.call { result in
-                completionWasRun = true
+            let completionCalled = expectationWithDescription("Completion was called")
+            promise.call { result in
+                completionCalled.fulfill()
                 TestHelpers.expectSuccess(expectedValue, result: result, message: "Expected the error to be transformed to a default value.")
             }
 
-            XCTAssertTrue(transformWasRun, "Expected the transform closure to be called immediately.")
-            XCTAssertTrue(completionWasRun, "Expected the completion block to be called immediately.")
+            waitForExpectationsWithTimeout(1.0, handler: nil)
         }
 
         // Recover failure to failure

        do {
            let initialPromise = Promise(value: 3)

            var transformWasRun = false
            let promise = initialPromise.map { value -> Int in
                transformWasRun = true
                return value + 10
            }

            var completionWasRun = false
            promise.call { result in
                completionWasRun = true
                TestHelpers.expectSuccess(13, result: result, message: "Expected the value to be transformed.")
            }

            XCTAssertTrue(transformWasRun, "Expected the transform closure to be called immediately.")
            XCTAssertTrue(completionWasRun, "Expected the completion block to be called immediately.")
        }

        // Map failure to failure

            let expectedError = TestHelpers.uniqueError()
            let initialPromise = Promise<Int>(error: expectedError)

            let promise = initialPromise.flatMap { value -> Promise<Int> in
                XCTFail("Expected the transform closure not to be called.")
                return Promise(value: value + 10)
            }

            let completionCalled = expectationWithDescription("Completion was called")
            promise.call { result in
                completionCalled.fulfill()
                TestHelpers.expectFailure(expectedError, result: result)
            }

            waitForExpectationsWithTimeout(1.0, handler: nil)
        }
    }

