merge_table_records_with_pk method integration with unit tests