             ]
         ] as [String: Any]
 
-        let info = CustomerInfo(testData: response)
-        XCTAssertEqual(Set(["onemonth_freetrial", "twomonth_freetrial", "threemonth_freetrial"]),
-                       info!.allPurchasedProductIdentifiers)
+        let info = try CustomerInfo(data: response)
+        expect(info.allPurchasedProductIdentifiers)
+        == Set(["onemonth_freetrial", "twomonth_freetrial", "threemonth_freetrial"])
     }
 
 }

                    ]
                ]
            ]])
        expect(info1).toNot(equal(info2))
    }

    func testDifferentEntitlementsNotEqual() {
        let info1 = CustomerInfo(testData: [
            "request_date": "2018-12-20T02:40:36Z",
            "subscriber": [
                "first_seen": "2019-07-17T00:05:54Z",

                "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",
