When unit testing asynchronous code like a completion handler, we could end up with false positives in case we just add some assert in the completion block. A better strategy is shown in the following sample. We will eliminate the false positive by the use of the waitForExpectations function.