@Test
public void initializeWithoutPurchases() {

    // Configure
    when(purchaseManager.getAllOwnedPurchases()).thenReturn(Observable.just(Collections.emptySet()));
    when(mobileAppPurchasesService.addPurchase(any(PurchaseRequest.class))).thenReturn(Observable.error(new Exception("test")));
    // Test
    ocrPurchaseTracker.initialize();
    // Verify
    verify(purchaseManager).addEventListener(ocrPurchaseTracker);
    verify(localOcrScansTracker).setRemainingScans(REMAINING_SCANS);
    verify(defaultInAppPurchaseConsumer, never()).consumePurchase(any(ManagedProduct.class), any(PurchaseFamily.class));
    verifyZeroInteractions(webServiceManager);
}