PaymentService implements PaymentRepository { @Override public void storePayment(@NonNull final IPaymentDescriptor payment) { this.payment = new PaymentWrapper(payment); fileManager.writeToFile(paymentFile, this.payment); } PaymentService(@NonNull final UserSelectionRepository userSelectionRepository,
        @NonNull final PaymentSettingRepository paymentSettingRepository,
        @NonNull final DisabledPaymentMethodRepository disabledPaymentMethodRepository,
        @NonNull final PluginRepository pluginRepository,
        @NonNull final DiscountRepository discountRepository,
        @NonNull final AmountRepository amountRepository,
        @NonNull final Context context,
        @NonNull final EscPaymentManager escPaymentManager,
        @NonNull final ESCManagerBehaviour escManagerBehaviour,
        @NonNull final TokenRepository tokenRepository,
        @NonNull final InstructionsRepository instructionsRepository,
        @NonNull final InitRepository initRepository,
        @NonNull final AmountConfigurationRepository amountConfigurationRepository,
        @NonNull final CongratsRepository congratsRepository,
        @NonNull final FileManager fileManager); @Override PaymentServiceEventHandler getObservableEvents(); @Override void reset(); @Override void storePayment(@NonNull final IPaymentDescriptor payment); @Nullable @Override IPaymentDescriptor getPayment(); @Override boolean hasRecoverablePayment(); @NonNull @Override PaymentRecovery createRecoveryForInvalidESC(); @NonNull @Override PaymentRecovery createPaymentRecovery(); @Override void startExpressPayment(@NonNull final PaymentConfiguration configuration); @Override void startPayment(); @Override boolean isExplodingAnimationCompatible(); @NonNull @Override List<PaymentData> getPaymentDataList(); @NonNull @Override PaymentResult createPaymentResult(@NonNull final IPaymentDescriptor payment); @Override int getPaymentTimeout(); MercadoPagoError getError();  }
@Test public void whenStorePayment() { paymentService.storePayment(mock(IPaymentDescriptor.class)); verify(fileManager).writeToFile(any(), any(PaymentWrapper.class)); }