ConsumableInAppPurchaseConsumer implements InAppPurchaseConsumer<ConsumablePurchase> { @Override public Completable consumePurchase(@NonNull ConsumablePurchase managedProduct, @NonNull PurchaseFamily purchaseFamily) { return purchaseManager.consumePurchase(managedProduct); } @Inject  ConsumableInAppPurchaseConsumer(@NonNull PurchaseManager purchaseManager); @Override boolean isConsumed(@NonNull ConsumablePurchase managedProduct, @NonNull PurchaseFamily purchaseFamily); @Override Completable consumePurchase(@NonNull ConsumablePurchase managedProduct, @NonNull PurchaseFamily purchaseFamily);  }
@Test public void consumePurchase() { final Completable completable = Completable.complete(); when(purchaseManager.consumePurchase(managedProduct)).thenReturn(completable); assertEquals(completable, consumableInAppPurchaseConsumer.consumePurchase(managedProduct, PurchaseFamily.Ocr)); }