Resolve loan status from dispute events (+ fix failing tests)
viaGlassdoor
You are given an existing program for evaluating loans. A loan can have multiple dispute events, each
with a status of OPEN, CLOSED, or FRAUD. Complete the method that, given an ArrayList of dispute
events for a single loan, returns the loan's final status according to these rules (evaluated in priority
order):
- If any dispute is
FRAUD→ returnFRAUDULENT. - Else if any dispute is
OPEN→ returnUNDER_INVESTIGATION. - Else (all disputes are
CLOSED) → returnOK/ valid.
Some helper methods are already implemented. As a second part, a few unit tests are failing — find and fix the bug in the existing helper code.
asked …