@Test
public void updatePurchases() {

    plusPurchaseWallet.updateLocalInAppPurchasesInWallet(Collections.singleton(managedProduct));
    assertTrue(plusPurchaseWallet.hasActivePurchase(InAppPurchase.SmartReceiptsPlus));
    assertTrue(plusPurchaseWallet.hasActivePurchase(InAppPurchase.OcrScans50));
    assertEquals(plusPurchaseWallet.getActiveLocalInAppPurchases(), Collections.singleton(managedProduct));
    assertEquals(preferences.getStringSet("key_sku_set", Collections.<String>emptySet()), Collections.singleton(InAppPurchase.OcrScans50.getSku()));
    assertEquals(preferences.getString("ocr_purchase_1_purchaseData", null), this.purchaseData);
    assertEquals(preferences.getString("ocr_purchase_1_inAppDataSignature", null), IN_APP_DATA_SIGNATURE);
}