AmountService implements AmountRepository { @Override @NonNull public BigDecimal getItemsAmount() { return paymentSetting.getCheckoutPreference().getTotalAmount(); } AmountService(@NonNull final PaymentSettingRepository paymentSetting,
        @NonNull final ChargeRepository chargeRepository,
        @NonNull final DiscountRepository discountRepository); @Override @NonNull BigDecimal getAmountToPay(@NonNull final String paymentTypeId, @Nullable final PayerCost payerCost); @NonNull @Override BigDecimal getAmountToPay(@NonNull final String paymentTypeId,
        @NonNull final DiscountConfigurationModel discountModel); @Override @NonNull BigDecimal getItemsAmount(); @NonNull @Override BigDecimal getItemsPlusCharges(@NonNull final String paymentTypeId); @NonNull @Override BigDecimal getAppliedCharges(@NonNull final String paymentTypeId, @Nullable final PayerCost payerCost); @NonNull @Override BigDecimal getAmountWithoutDiscount(@NonNull final String paymentTypeId, @Nullable final PayerCost payerCost);  }
@Test public void whenGetItemsAmountThenReturnTotalAmount() { assertEquals(BigDecimal.TEN, amountService.getItemsAmount()); }