 		let existingStoreVersionHashes = existingStoreMetadata[NSStoreModelVersionHashesKey] as! [String: AnyObject]!
 		XCTAssertNotNil(existingStoreVersionHashes, "Could not retrieve version hashes from \(storeURL).")
 		
+		let operationExpectation = expectationWithDescription("Migration operation succeeded")
 		let operationQueue = NSOperationQueue()
 		operationQueue.name = "Core Data Migration Test"
 		let migrationOperation = MigrationOperation()

		let existingStoreMetadata: [String: AnyObject]
		do {
			existingStoreMetadata = try NSPersistentStoreCoordinator.metadataForPersistentStoreOfType(storeType, URL: storeURL)
		} catch {
			XCTFail("Could not retrieve store metadata: \(error)")
			existingStoreMetadata = [:]
		}
		do {
			let _ = try MigrationPlan(storeMetadata: existingStoreMetadata, destinationModel: latestModel, bundles: [testBundle])
		} catch {
			XCTFail("Could not devise migration plan for \(storeURL): \(error)")
		}
	}
}

    
    override func setUp() {
        super.setUp()
		testBundle = NSBundle(forClass: self.dynamicType)
		
		for versionNumber in 1...3 {
			let modelURL: NSURL! = testBundle.URLForResource("TestModelV\(versionNumber)", withExtension: "mom")
			XCTAssertNotNil(modelURL, "Could not locate V\(versionNumber) test model.")
			let model: NSManagedObjectModel! = NSManagedObjectModel(contentsOfURL: modelURL)
