test: add a test for sub_record