@Test
public void onPurchaseSuccessWhenNotLoggedIn() {

    // Configure
    when(identityManager.isLoggedInStream()).thenReturn(Observable.just(false));
    // Test
    ocrPurchaseTracker.onPurchaseSuccess(InAppPurchase.OcrScans50, PurchaseSource.Unknown);
    // Verify
    verify(defaultInAppPurchaseConsumer, never()).consumePurchase(any(ManagedProduct.class), any(PurchaseFamily.class));
    verify(localOcrScansTracker, never()).setRemainingScans(REMAINING_SCANS);
    verifyZeroInteractions(webServiceManager);
}