Cosmic Module
O
Qubits of DPK
April 7, 2026
Core Open Source
https://github.com/apache/fineract/pull/5670
Title
FINERACT-2454: Migrate ClientLoanAccountLockIntegrationTest from RestAssured to Feign Client
1. Overview
This PR is part of the FINERACT-2454 integration test modernization initiative.
The objective is to migrate the integration test:
plain text
QUBITS OF DPK
from RestAssured-based HTTP testing to the Fineract Feign client.
This improves the maintainability and reliability of the test suite by removing manual HTTP calls and using typed API interfaces.
2. What This Test Verifies
This integration test validates the loan account locking workflow.
Loan account locking is used to prevent further operations on a loan account when certain conditions occur.
Scenario Tested
plain text
QUBITS OF DPK
The API endpoint involved:
plain text
QUBITS OF DPK
This command triggers the loan account locking process inside the Fineract loan service.
3. Problem in the Old Implementation
Previously, the test used RestAssured to manually call the API endpoint.
Example:
plain text
QUBITS OF DPK
Limitations of this approach
Example of fragile code:
plain text
QUBITS OF DPK
If the API path changes, every test must be updated manually.
4. Old Test Flow (RestAssured)
Before this PR, the integration test flow looked like this:
plain text
QUBITS OF DPK
The test itself handled:
- constructing the HTTP request
- adding authentication headers
- sending the request
- validating the response
This added unnecessary complexity.
5. New Implementation (Feign Client)
After this PR, the test uses the Fineract Feign client.
Example usage:
plain text
QUBITS OF DPK
The Feign client automatically performs:
- HTTP request generation
- request serialization
- response deserialization
The integration test no longer needs to deal with low-level HTTP details.
6. Code Structure Before vs After
Before (RestAssured)
plain text
QUBITS OF DPK
Characteristics:
- manual HTTP calls
- string-based endpoint construction
- repetitive boilerplate
After (Feign Client)
plain text
QUBITS OF DPK
Characteristics:
- typed API interface
- automatic request generation
- DTO-based responses
7. Internal Flow After Migration
plain text
QUBITS OF DPK
The Feign client acts as a typed abstraction layer over the REST API.
8. Benefits of This Change
9. Impact on Fineract Codebase
This PR contributes to the ongoing integration test modernization.
Key impacts:
- standardizes how integration tests interact with APIs
- reduces duplicated HTTP boilerplate
- improves long-term maintainability of the test suite
This migration is part of the broader effort to completely remove RestAssured usage from the Fineract integration test framework.