Add mock and test for get_record