Use getRecord to get a record in unit test