Add unit test for loan controller