Exercise

Mocking Exercise

Objective

Extend the EazyLoan app for a scenario to find if there is an outstanding loan for the user, given his userId. Write a test to verify the same. You can add the required properties to the model as required and then define the method in the interface as required.

Note

We need to check the user's validity before we return the result from the repository.

Optionally

You could also write a more complex method to fetch the sum of all outstanding loan amounts for the given user!

Last updated