         rootViewController!.present(viewController, animated: true, completion: {
             exp.fulfill()
         })
-        waitForExpectations(timeout: 10, handler: nil)
+        let _ = waiter.wait(for: [exp], timeout: 10)
     }
 
     func waitABitAndVerify(viewController: UIViewController) {

            self.FBSnapshotVerifyView(view)
            exp.fulfill()
        }
        waitForExpectations(timeout: 1) { _ in }
    }
}

import BSWInterfaceKit

class BSWSnapshotTest: FBSnapshotTestCase {

    let waiter = XCTWaiter()

    override func setUp() {
        super.setUp()

