Aman-Mittal commented on code in PR #6084:
URL: https://github.com/apache/fineract/pull/6084#discussion_r3522807161


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/FeignLoanTestBase.java:
##########
@@ -419,6 +541,48 @@ protected void verifyJournalEntriesSequentially(Long 
loanId, LoanTestData.Journa
         journalHelper.verifyJournalEntriesSequentially(loanId, 
expectedEntries);
     }
 
+    protected void checkJournalEntryForAssetAccount(Account account, String 
date, LoanTestData.Journal... entries) {
+        journalHelper.checkJournalEntryForAssetAccount(account, date, entries);
+    }
+
+    protected void checkJournalEntryForLiabilityAccount(Account account, 
String date, LoanTestData.Journal... entries) {
+        journalHelper.checkJournalEntryForLiabilityAccount(account, date, 
entries);
+    }
+
+    protected void checkJournalEntryForIncomeAccount(Account account, String 
date, LoanTestData.Journal... entries) {
+        journalHelper.checkJournalEntryForIncomeAccount(account, date, 
entries);
+    }
+
+    protected void checkJournalEntryForExpenseAccount(Account account, String 
date, LoanTestData.Journal... entries) {
+        journalHelper.checkJournalEntryForExpenseAccount(account, date, 
entries);
+    }
+
+    protected static void 
assertErrorGlobalisationCode(CallFailedRuntimeException exception, String 
expectedCode) {
+        assertEquals(expectedCode, extractErrorGlobalisationCode(exception));
+    }
+
+    protected static String 
extractErrorGlobalisationCode(CallFailedRuntimeException exception) {
+        if (!(exception.getCause() instanceof FeignException feignException)) {
+            return exception.getUserMessageGlobalisationCode();
+        }
+        String topLevelCode = feignException.getUserMessageGlobalisationCode();
+        if (topLevelCode != null && 
!topLevelCode.equals("validation.msg.validation.errors.exist")
+                && 
!topLevelCode.equals("validation.msg.domain.rule.violation")) {
+            return topLevelCode;
+        }
+        try {
+            @SuppressWarnings("unchecked")

Review Comment:
   Why suppressing warings here?



-- 
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