         }
 
         // Add both tokens to the keychain
-        let savedItem1 = try keychain.addToken(token1)
-        let savedItem2 = try keychain.addToken(token2)
+        guard let savedItem1 = try? keychain.addToken(token1) else {
+            XCTFail("Failed to save to keychain: \(token1)")
+            return
+        }
+        guard let savedItem2 = try? keychain.addToken(token2) else {
+            XCTFail("Failed to save to keychain: \(token2)")
+            return
+        }
         XCTAssertEqual(savedItem1.token, token1)
         XCTAssertEqual(savedItem2.token, token2)
 
         // Fetch both tokens from the keychain
-        guard let fetchedItem1 = try keychain.persistentTokenWithIdentifier(savedItem1.identifier) else {
-            XCTFail("Token should be in keychain: \(token1)")
-            return
-        }
-        guard let fetchedItem2 = try keychain.persistentTokenWithIdentifier(savedItem2.identifier) else {
-            XCTFail("Token should be in keychain: \(token2)")
-            return
-        }
-        XCTAssertEqual(savedItem1, fetchedItem1)
-        XCTAssertEqual(savedItem2, fetchedItem2)
+        do {
+            guard let fetchedItem1 = try keychain.persistentTokenWithIdentifier(savedItem1.identifier) else {
+                XCTFail("Token should be in keychain: \(token1)")
+                return
+            }
+            guard let fetchedItem2 = try keychain.persistentTokenWithIdentifier(savedItem2.identifier) else {
+                XCTFail("Token should be in keychain: \(token2)")
+                return
+            }
+            XCTAssertEqual(savedItem1, fetchedItem1)
+            XCTAssertEqual(savedItem2, fetchedItem2)
+        } catch {
+            XCTFail("Error thrown from keychain: \(error)")
+            return
+        }
 
         // Remove the first token from the keychain
         do {

        } catch {
            // TODO: Assert the expected error type
        }

    } catch {
        XCTFail("Error thrown from keychain: \(error)")
        return
    }
    }

    func itemFromArray(items: [PersistentToken], withPersistentRef persistentRef: NSData) -> PersistentToken? {

    }

    func testDuplicateURLs() {
        guard let token1 = Token.URLSerializer.deserialize(kValidTokenURL),
            let token2 = Token.URLSerializer.deserialize(kValidTokenURL) else {
                XCTFail("Failed to construct tokens from url.")
