Unit test for record reading