ExpressPaymentPresenter extends BasePresenter<ExpressPayment.View> implements ExpressPayment.Actions, AmountDescriptorView.OnClickListener { @Override public void cancel() { tracker.trackBack(); getView().cancel(); } ExpressPaymentPresenter(@NonNull final PaymentSettingRepository paymentSettingRepository,
        @NonNull final DisabledPaymentMethodRepository disabledPaymentMethodRepository,
        @NonNull final PayerCostSelectionRepository payerCostSelectionRepository,
        @NonNull final DiscountRepository discountRepository,
        @NonNull final AmountRepository amountRepository,
        @NonNull final InitRepository initRepository,
        @NonNull final AmountConfigurationRepository amountConfigurationRepository,
        @NonNull final ChargeRepository chargeRepository,
        @NonNull final ESCManagerBehaviour escManagerBehaviour,
        @NonNull final PaymentMethodDrawableItemMapper paymentMethodDrawableItemMapper,
        @NonNull final ExperimentsRepository experimentsRepository,
        @NonNull final PayerComplianceRepository payerComplianceRepository,
        @NonNull final TrackingRepository trackingRepository,
        @NonNull final PaymentMethodDescriptorMapper paymentMethodDescriptorMapper,
        @NonNull final CustomTextsRepository customTextsRepository); @Override void loadViewModel(); @Override void attachView(final ExpressPayment.View view); @Override void recoverFromBundle(@NonNull final Bundle bundle); @NonNull @Override Bundle storeInBundle(@NonNull final Bundle bundle); @Override void onFreshStart(); @Override void cancel(); @Override void onBack(); @Override void onInstallmentsRowPressed(); @Override void onInstallmentSelectionCanceled(); @Override void onSliderOptionSelected(final int paymentMethodIndex); @Override void onPayerCostSelected(final PayerCost payerCostSelected); void onDisabledDescriptorViewClick(); @Override void onDiscountAmountDescriptorClicked(@NonNull final DiscountConfigurationModel discountModel); @Override void onChargesAmountDescriptorClicked(@NonNull final DynamicDialogCreator dynamicDialogCreator); @Override void onSplitChanged(final boolean isChecked); @Override void onHeaderClicked(); @Override void onPostPaymentAction(@NonNull final PostPaymentAction postPaymentAction); @Override void onOtherPaymentMethodClicked(); @Override @SuppressLint("WrongConstant") void handlePrePaymentAction(@NonNull final PayButton.OnReadyForPaymentCallback callback); @Override void handleGenericDialogAction(@NonNull @ActionType final String type); @Override void handleDeepLink(); @Override void onCardFormResult();  }
@Test public void whenCanceledThenCancelAndTrack() { expressPaymentPresenter.cancel(); verify(view).cancel(); verifyNoMoreInteractions(view); }