                     ]
                 ]
             ]])
-        expect(info1).toNot(equal(info2))
-    }
-
-    func testSameEntitlementsDifferentRequestDateEqual() {
-        let info1 = CustomerInfo(testData: [
+        expect(info1) != info2
+    }
+
+    func testSameEntitlementsDifferentRequestDateEqual() throws {
+        let info1 = try CustomerInfo(data: [
             "request_date": "2018-12-21T02:40:36Z",
             "subscriber": [
                 "first_seen": "2019-07-17T00:05:54Z",

    func testParsesExpirationDate() throws {
        let customerInfo = try XCTUnwrap(self.customerInfo)
        let expireDate = try XCTUnwrap(customerInfo.expirationDate(forProductIdentifier: "onemonth_freetrial"))
        expect(expireDate.timeIntervalSince1970).to(equal(4123276836))
    }

    func testListActiveSubscriptions() {
        XCTAssertEqual(Set(["onemonth_freetrial"]), customerInfo!.activeSubscriptions)
    }

    func testAllPurchasedProductIdentifier() {
        let allPurchased = customerInfo!.allPurchasedProductIdentifiers

        expect(allPurchased).to(equal(Set(["onemonth_freetrial", "threemonth_freetrial", "onetime_purchase"])))
    }

    func testLatestExpirationDateHelper() {
        let latestExpiration = customerInfo!.latestExpirationDate

        expect(latestExpiration).toNot(beNil())

        expect(latestExpiration).to(equal(customerInfo!.expirationDate(forProductIdentifier: "onemonth_freetrial")))
    }

    func testParsesOtherPurchases() {
        let nonConsumables = customerInfo!.nonSubscriptionTransactions
        expect(nonConsumables.count).to(equal(1))

        expect(nonConsumables[0].productIdentifier).to(equal("onetime_purchase"))
    }

    @available(*, deprecated) // Ignore deprecation warnings
    func testDeprecatedParsesOtherPurchases() {
        let nonConsumables = customerInfo!.nonConsumablePurchases
        expect(nonConsumables.count).to(equal(1))

        expect(nonConsumables).to(contain(["onetime_purchase"]))
    }

    func testOriginalApplicationVersionNilIfNotPresent() {
        let customerInfo = CustomerInfo(testData: [
            "request_date": "2019-08-16T10:30:42Z",
            "subscriber": [
                "original_app_user_id": "app_user_id",

                "subscriptions": [:],
                "other_purchases": [:]
            ]])
        expect(customerInfo.originalApplicationVersion).to(beNil())
    }

    func testOriginalApplicationVersionNilIfNull() throws {
        let customerInfo = try CustomerInfo(data: [
            "request_date": "2019-08-16T10:30:42Z",
            "subscriber": [
                "original_app_user_id": "app_user_id",
