Skip to content

FINERACT-2454: Migrate ClientLoanAccountLockIntegrationTest from RestAssured to feign client#5670

Open
Dpk376 wants to merge 5 commits intoapache:developfrom
Dpk376:feature/FINERACT-2441-feign-migration-loanlocktest
Open

FINERACT-2454: Migrate ClientLoanAccountLockIntegrationTest from RestAssured to feign client#5670
Dpk376 wants to merge 5 commits intoapache:developfrom
Dpk376:feature/FINERACT-2441-feign-migration-loanlocktest

Conversation

@Dpk376
Copy link

@Dpk376 Dpk376 commented Mar 21, 2026

Description

Relates to FINERACT-2454

Migrates ClientLoanAccountLockIntegrationTest from RestAssured to the type-safe feign client.

Changes

  • Replaced RequestSpecification/ResponseSpecification boilerplate with extends BaseLoanIntegrationTest
  • Removed @BeforeEach setup, clientHelper, loanTransactionHelper, loanAccountLockHelper instance fields
  • Replaced ClientHelper.createClient(requestSpec, responseSpec)ClientHelper.addClientAsPerson()
  • Replaced LoanProductTestBuilder + getLoanProductId()createLoanProduct(createOnePeriod30DaysLongNoInterestPeriodicAccrualProduct())
  • Replaced LoanApplicationTestBuilder + getLoanId()applyLoan(applyLoanRequest(...))
  • Replaced approveLoan(String, Integer)approveLoan(Long, PostLoansLoanIdRequest)
  • Replaced disburseLoanWithNetDisbursalAmount()disburseLoan(Long, String, Double)
  • Replaced LoanStatusChecker HashMap assertions → verifyLoanStatus(loanId, LoanStatus.*)
  • Replaced LoanAccountLockHelper.placeSoftLockOnLoanAccount() (RestAssured) → FineractClientHelper.getFineractClient().legacy.placeLockOnLoanAccount() (feign)
  • Replaced clientHelper.retrieveLockedAccounts() instance call → FineractClientHelper.getFineractClient().loanAccountLockApi.retrieveLockedAccounts() (feign)

Result

134 lines → 65 lines. Zero RestAssured imports remaining.

No behavioral changes — the test still verifies that a soft-locked loan account appears in the locked accounts list.

Dpk376 added 5 commits March 20, 2026 17:43
…rn array response

Corrected the @apiresponse annotation in ClientsApiResource for both
clientId and externalId obligee endpoints to use @ArraySchema, reflecting
the actual JSON array response returned by the server.

Promoted GetObligeeData to a top-level swagger schema class and removed
the GetClientObligeeDetailsResponse wrapper class that was incorrectly
describing the response as an object.

Updated ClientHelper.getObligeeData() to use the now-correct feign client
method, removing the RestAssured workaround.
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