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):
FRAUD → return FRAUDULENT.OPEN → return UNDER_INVESTIGATION.CLOSED) → return OK / 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.