Add test and modified record_manager