             XCTAssertNil(error, "\(error)")
         }
 
-        let afterFirstSync = now()
+        let afterFirstSync = NSDate.now()
 
         // Store a fresh crypto/keys, with the same default key, one identical collection key, and one changed collection key.
         let freshCryptoKeys = Keys.init(defaultBundle: cryptoKeys.defaultBundle)

            XCTAssertNil(error, "\(error)")
        }

        let afterFirstSync = now()

        // Store a meta/global with a new global syncID.
        let newMetaGlobal = metaGlobal.withSyncID("newID")

        stateMachine = SyncStateMachine(prefs: syncPrefs)
    }

    func storeMetaGlobal(metaGlobal: MetaGlobal) {
        let envelope = EnvelopeJSON(JSON([
            "id": "global",
            "collection": "meta",
            "payload": metaGlobal.asPayload().toString(),
            "modified": Double(NSDate.now())/1000]))
        server.storeRecords([envelope], inCollection: "meta")
    }

