 
             // Fetch the token again
             do {
-                guard let thirdKeychainItem = try keychain.persistentTokenWithIdentifier(savedToken.identifier) else {
-                    XCTFail("Failed to recover persistent token with identifier: \(savedToken.identifier)")
-                    return
-                }
-                XCTAssertEqual(thirdKeychainItem.token, modifiedToken)
-                XCTAssertEqual(thirdKeychainItem.identifier, savedToken.identifier)
+                let fetchedToken = try keychain.persistentTokenWithIdentifier(savedToken.identifier)
+                XCTAssertEqual(fetchedToken?.token, modifiedToken)
+                XCTAssertEqual(fetchedToken?.identifier, savedToken.identifier)
             } catch {
                 XCTFail("persistentTokenWithIdentifier(_:) failed with error: \(error)")
                 return


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


            // Attempt to restore the deleted token
            do {
                let fetchedToken = try keychain.persistentTokenWithIdentifier(savedToken.identifier)
                XCTAssertNil(fetchedToken, "Token should have been removed from keychain")
            } catch {
                XCTFail("persistentTokenWithIdentifier(_:) failed with error: \(error)")
                return
