Fixed test cases according to the new change in the LoanDao where
returned query is a list