FINERACT-2181: Fix integration test / unify getLoanRepaymentScheduleDetail()

This commit is contained in:
Adam Saghy
2025-06-06 15:08:40 +02:00
parent caf42f733c
commit 19b2a77127
12 changed files with 24 additions and 28 deletions
@@ -177,7 +177,7 @@ class LoanChargeWritePlatformServiceImplTest {
when(chargeDefinition.getChargeTimeType()).thenReturn(SPECIFIED_DUE_DATE);
when(chargeDefinition.getCurrencyCode()).thenReturn(CURRENCY_CODE);
when(loanChargeAssembler.createNewFromJson(loan, chargeDefinition, jsonCommand)).thenReturn(loanCharge);
when(loan.repaymentScheduleDetail()).thenReturn(loanRepaymentScheduleDetail);
when(loan.getLoanProductRelatedDetail()).thenReturn(loanRepaymentScheduleDetail);
when(loanRepaymentScheduleDetail.getLoanScheduleType()).thenReturn(LoanScheduleType.CUMULATIVE);
when(loan.getLoanRepaymentScheduleDetail()).thenReturn(loanRepaymentScheduleDetail);
when(loan.hasCurrencyCodeOf(CURRENCY_CODE)).thenReturn(true);
@@ -162,7 +162,7 @@ public class LoanDownPaymentHandlerServiceImplTest {
when(loanRepaymentRelatedDetail.getInstallmentAmountInMultiplesOf()).thenReturn(10);
when(loanForProcessing.getLoanRepaymentScheduleDetail()).thenReturn(loanRepaymentRelatedDetail);
when(loanForProcessing.repaymentScheduleDetail()).thenReturn(loanRepaymentRelatedDetail);
when(loanForProcessing.getLoanProductRelatedDetail()).thenReturn(loanRepaymentRelatedDetail);
when(loanRepaymentRelatedDetail.isInterestRecalculationEnabled()).thenReturn(true);
when(loanForProcessing.isInterestBearingAndInterestRecalculationEnabled()).thenReturn(true);
when(loanRepaymentRelatedDetail.getDisbursedAmountPercentageForDownPayment()).thenReturn(BigDecimal.valueOf(10));