                                isTrialPeriod: isTrialPeriod)
 
         let newerPurchaseDate = makeDateAtMidnight(year: 2017, month: 5, day: 14)
-        let newerExpirationDate = olderPurchaseDate.addingTimeInterval(60 * 60)
+        let newerExpirationDate = newerPurchaseDate.addingTimeInterval(60 * 60)
         let newerItem = ReceiptItem(productId: productId,
                                     purchaseDate: newerPurchaseDate,
                                     subscriptionExpirationDate: newerExpirationDate,

        XCTAssertEqual(verifySubscriptionResult, expectedSubscriptionResult)
    }

    func verifyAutoRenewableSubscription_when_twoSubscriptions_sameProductId_bothExpired_then_resultIsExpired_itemsSorted() {
        
        let receiptRequestDate = makeDateAtMidnight(year: 2017, month: 5, day: 14)
        

import XCTest
import SwiftyStoreKit

// swiftlint:disable file_length
private extension TimeInterval {
    var millisecondsNSString: NSString {
        return String(format: "%.0f", self * 1000) as NSString
