         assertClientsHaveGUIDsFromStorage(tabs, expected: ["abcdefghijkl"])
 
         // Tell the sync manager that "clients" has changed syncID.
-        let e = MockEngineStateChanges()
-        e.collections.append("clients")
+        let engine = MockEngineStateChanges()
+        engine.collections.append("clients")
 
-        _ = profile.tabs.reopenIfClosed()
+        let error = profile.tabs.reopenIfClosed()
+        if let error = error {
+            XCTFail("Could not reopen tabs, failed with error \(error.description)")
+            return
+        }
 
-        XCTAssertTrue(profile.peekSyncManager.takeActionsOnEngineStateChanges(e).value.isSuccess)
+        XCTAssertTrue(profile.peekSyncManager.takeActionsOnEngineStateChanges(engine).value.isSuccess)
 
         // We threw away the command.
-        XCTAssertTrue(e.clearWasCalled)
+        XCTAssertEqual(engine.clearLocalCommandsCount, 1, "Clear local commands was called once")
 
         // And now we have no local clients.
         let empty = tabs.getClients().value.successValue

        XCTAssertEqual(empty!, [])
    }
}

import UIKit

import XCTest

class ResetTests: XCTestCase {
    func testResetting() {
