Cosmic Module
O
Qubits of DPK
April 7, 2026
Core Open Source
https://github.com/apache/fineract/pull/5658
Title
FINERACT-2454: Migrate Integration Tests from RestAssured to Feign Client
1. Overview
This PR continues the FINERACT-2454 test modernization effort in Apache Fineract.
The main objective of this change is to migrate existing integration tests from RestAssured to the Fineract Feign client.
Previously, integration tests were responsible for manually constructing HTTP requests and handling JSON responses.
After this migration, tests use typed API client interfaces, which simplifies test logic and improves maintainability.
2. What This PR Changes
This PR migrates one or more integration tests that previously relied on RestAssured HTTP calls.
The migration replaces:
plain text
QUBITS OF DPK
with
plain text
QUBITS OF DPK
As a result:
- Tests no longer manually create HTTP requests.
- API calls are executed using typed Java interfaces.
3. Problem in the Old Implementation
Previously, integration tests used RestAssured.
Example pattern:
plain text
QUBITS OF DPK
Limitations
These issues made integration tests:
- harder to read
- harder to maintain
- more prone to break when APIs changed
4. Old Test Flow (RestAssured)
Before this PR, the test flow looked like this:
plain text
QUBITS OF DPK
The test itself handled:
- building the HTTP request
- converting objects to JSON
- parsing response JSON
5. New Implementation (Feign Client)
After the migration, tests use the Fineract Feign client.
Example usage:
plain text
QUBITS OF DPK
The Feign client automatically handles:
- HTTP request creation
- request serialization
- response deserialization
This removes unnecessary complexity from the tests.
6. Code Structure Before vs After
Before (RestAssured)
plain text
QUBITS OF DPK
Characteristics:
- raw HTTP request
- string-based endpoint
- manual request handling
After (Feign Client)
plain text
QUBITS OF DPK
Characteristics:
- typed API interface
- request objects automatically serialized
- response mapped to DTO models
7. Internal Flow After Migration
plain text
QUBITS OF DPK
The integration test now focuses only on verifying business logic and API behavior, not HTTP mechanics.
8. Benefits of This Change
9. Impact on Fineract Codebase
This PR contributes to the long-term goal of:
plain text
QUBITS OF DPK
Benefits for the project include:
- modernized testing architecture
- consistent API client usage
- easier future refactoring
If you want, I’ll give the next one (PR #5670).
That one is important because it migrates the ClientLoanAccountLockIntegrationTest, which tests loan account locking behavior, and it will help you understand how loan state transitions are tested in Fineract.