Skip to content

FINERACT-2454: Migrate LoanWithdrawnByApplicantIntegrationTest from RestAssured to feign client#5668

Open
Dpk376 wants to merge 3 commits intoapache:developfrom
Dpk376:feature/FINERACT-2454-migrate-loan-withdrawn-test
Open

FINERACT-2454: Migrate LoanWithdrawnByApplicantIntegrationTest from RestAssured to feign client#5668
Dpk376 wants to merge 3 commits intoapache:developfrom
Dpk376:feature/FINERACT-2454-migrate-loan-withdrawn-test

Conversation

@Dpk376
Copy link

@Dpk376 Dpk376 commented Mar 21, 2026

Description

Closes/relates to FINERACT-2454

Migrates LoanWithdrawnByApplicantIntegrationTest from RestAssured to the type-safe feign client, as part of the ongoing test migration effort.

Changes

  • Replaced RequestSpecification/ResponseSpecification boilerplate with extends BaseLoanIntegrationTest
  • Removed @BeforeEach setup — lifecycle managed by BaseLoanIntegrationTest
  • Replaced ClientHelper.createClient(requestSpec, responseSpec, ...)ClientHelper.createClient(PostClientsRequest)
  • Replaced LoanProductTestBuildercreateOnePeriod30DaysLongNoInterestPeriodicAccrualProduct()
  • Replaced LoanApplicationTestBuilder + CollateralManagementHelper (no feign equivalent) → applyLoan(applyLoanRequest(...))
  • Replaced LoanStatusChecker HashMap-based assertions → verifyLoanStatus(loanId, LoanStatus.*)
  • Replaced withdrawLoanApplicationByClient()withdrawnByApplicantLoan(externalId, PostLoansLoanIdRequest)

Result

102 lines → 60 lines. Zero RestAssured imports remaining.

No behavioral changes — the test still verifies that a pending loan application can be withdrawn by the applicant and transitions to WITHDRAWN_BY_CLIENT status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant