@Test
public void initializeFailsToFetchMe() {

    // Configure
    when(identityManager.getMe()).thenReturn(Observable.error(new Exception("test")));
    when(purchaseManager.getAllOwnedPurchases()).thenReturn(Observable.just(Collections.singleton(managedProduct)));
    when(mobileAppPurchasesService.addPurchase(any(PurchaseRequest.class))).thenReturn(Observable.just(purchaseResponse));
    // Test
    ocrPurchaseTracker.initialize();
    // Verify
    verify(purchaseManager).addEventListener(ocrPurchaseTracker);
    verify(localOcrScansTracker, never()).setRemainingScans(anyInt());
    verify(defaultInAppPurchaseConsumer).consumePurchase(managedProduct, PurchaseFamily.Ocr);
}