PaymentMethodsTableActionAlterations extends StubTableActionAlterations<PaymentMethod> { @NonNull @Override public Single<PaymentMethod> postDelete(@Nullable PaymentMethod paymentMethod) { return super.postDelete(paymentMethod) .doOnSuccess(ignored -> receiptsTable.clearCache()); } PaymentMethodsTableActionAlterations(@NonNull ReceiptsTable receiptsTable); @NonNull @Override Single<PaymentMethod> postUpdate(@NonNull PaymentMethod oldPaymentMethod, @Nullable PaymentMethod newPaymentMethod); @NonNull @Override Single<PaymentMethod> postDelete(@Nullable PaymentMethod paymentMethod);  }
@Test public void postDelete() { alterations.postDelete(paymentMethod1) .test() .assertValue(paymentMethod1) .assertComplete() .assertNoErrors(); verify(receiptsTable).clearCache(); }