     let keychain = Keychain.sharedInstance
 
     func testTokenWithKeychainItemRef() {
-    do {
         // Create a token
         guard let token = Token.URLSerializer.deserialize(kValidTokenURL) else {
             XCTFail("Failed to construct token from url")

        }

        // Attempt to restore the deleted token
        let fourthKeychainItem = try keychain.persistentTokenWithIdentifier(keychainItem.identifier)
        XCTAssertNil(fourthKeychainItem)
    } catch {
        XCTFail("Error thrown from keychain: \(error)")
        return
    }
    }

    func testDuplicateURLs() {

        XCTAssertEqual(token.generator.secret, NSData(bytes: kValidSecret, length: kValidSecret.count))

        // Save the token
        guard let keychainItem = try? keychain.addToken(token) else {
            XCTFail("Failed to save token to keychain")
            return
        }

        // Restore the token
        do {
            guard let secondKeychainItem = try keychain.persistentTokenWithIdentifier(keychainItem.identifier) else {
                XCTFail("Failed to recover persistent token with identifier: \(keychainItem.identifier)")
                return
            }
            XCTAssertEqual(secondKeychainItem.token, keychainItem.token)
            XCTAssertEqual(secondKeychainItem.identifier, keychainItem.identifier)
        } catch {
            XCTFail("Error thrown from keychain: \(error)")
            return
        }

        // Modify the token
        let modifiedToken = Token(name: "???", issuer: "!", generator: token.generator.successor())
