Cosmic Module
O
Qubits of DPK
April 7, 2026
Core Open Source
https://github.com/apache/fineract/pull/5668
Title
FINERACT-2454: Migrate LoanWithdrawnByApplicantIntegrationTest from RestAssured to Feign Client
1. Overview
This PR is part of the FINERACT-2454 initiative, which aims to modernize Apache Fineract integration tests.
The goal is to replace RestAssured based HTTP tests with the Fineract Feign client.
In this PR, the integration test:
plain text
QUBITS OF DPK
was migrated.
2. What This Test Verifies
This test verifies the loan withdrawal by applicant workflow.
Scenario
plain text
QUBITS OF DPK
This operation corresponds to the API endpoint:
plain text
QUBITS OF DPK
3. Problem in the Old Implementation
Previously the test used RestAssured to make HTTP calls.
Example pattern:
plain text
QUBITS OF DPK
Issues with this approach
Example problem:
plain text
QUBITS OF DPK
If the endpoint changes, every test must be updated manually.
4. Old Test Flow (RestAssured)
plain text
QUBITS OF DPK
The test itself was responsible for:
- building the HTTP request
- serializing JSON
- validating responses
5. New Implementation (Feign Client)
After this PR, the test uses the Fineract generated API client.
Example usage:
plain text
QUBITS OF DPK
What happens internally
The Feign client:
- builds the HTTP request
- serializes request objects
- deserializes response DTOs
The test now focuses only on business logic verification.
6. Code Structure Before vs After
Before (RestAssured)
plain text
QUBITS OF DPK
Characteristics:
- raw HTTP calls
- manual endpoint construction
- manual JSON handling
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 test code no longer handles HTTP details.
8. Benefits of This Change
9. Impact on Fineract Codebase
This PR contributes to the long-term goal of removing RestAssured tests completely.
Benefits for the project:
- modern testing infrastructure
- easier API evolution
- consistent client usage