DeathGun44 commented on code in PR #6084:
URL: https://github.com/apache/fineract/pull/6084#discussion_r3535516265


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/helpers/FeignLoanHelper.java:
##########
@@ -367,26 +447,296 @@ public PutLoansAvailableDisbursementAmountResponse 
modifyAvailableDisbursementAm
         return ok(() -> 
fineractClient.loans().modifyLoanAvailableDisbursementAmount(loanId, request));
     }
 
-    public Long createRescheduleRequest(PostCreateRescheduleLoansRequest 
request) {
-        PostCreateRescheduleLoansResponse response = ok(() -> 
fineractClient.rescheduleLoans().createLoanRescheduleRequest(request));
-        return response.getResourceId();
+    public PostCreateRescheduleLoansResponse 
createRescheduleRequest(PostCreateRescheduleLoansRequest request) {
+        if (request instanceof 
LoanRequestBuilders.RescheduleRequestWithRecalculateInterest recalcRequest
+                && 
Boolean.TRUE.equals(recalcRequest.getRecalculateInterest())) {
+            return new 
PostCreateRescheduleLoansResponse().resourceId(createRescheduleRequestFromJson(toRescheduleJson(request,
 true)));
+        }
+        return ok(() -> 
fineractClient.rescheduleLoans().createLoanRescheduleRequest(request));
+    }
+
+    public CallFailedRuntimeException 
createRescheduleRequestExpectingError(PostCreateRescheduleLoansRequest request) 
{

Review Comment:
   Removed the method entirely, it had no callers and the recalc path could 
never return the expected exception anyway.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to