@Test
public void ensureUpdatedPurchaseListIsPersistedAndPlusRemains() {

    // First add it
    plusPurchaseWallet.addLocalInAppPurchaseToWallet(managedProduct);
    // Then revoke it
    plusPurchaseWallet.updateLocalInAppPurchasesInWallet(Collections.<ManagedProduct>emptySet());
    final PurchaseWallet newWallet = new PlusPurchaseWallet(sharedPreferencesLazy);
    assertTrue(newWallet.hasActivePurchase(InAppPurchase.SmartReceiptsPlus));
    assertNull(newWallet.getLocalInAppManagedProduct(InAppPurchase.SmartReceiptsPlus));
    assertTrue(plusPurchaseWallet.hasActivePurchase(InAppPurchase.SmartReceiptsPlus));
    assertNull(plusPurchaseWallet.getLocalInAppManagedProduct(InAppPurchase.SmartReceiptsPlus));
    assertFalse(newWallet.hasActivePurchase(InAppPurchase.OcrScans50));
    assertNull(newWallet.getLocalInAppManagedProduct(InAppPurchase.OcrScans50));
    assertFalse(plusPurchaseWallet.hasActivePurchase(InAppPurchase.OcrScans50));
    assertNull(plusPurchaseWallet.getLocalInAppManagedProduct(InAppPurchase.OcrScans50));
    assertEquals(newWallet.getActiveLocalInAppPurchases(), Collections.emptySet());
    assertEquals(plusPurchaseWallet.getActiveLocalInAppPurchases(), Collections.emptySet());
    assertEquals(preferences.getStringSet("key_sku_set", Collections.<String>emptySet()), Collections.emptySet());
    assertFalse(preferences.contains("ocr_purchase_1_purchaseData"));
    assertFalse(preferences.contains("ocr_purchase_1_inAppDataSignature"));
}