Added functional test for updating ReferenceId with non-unique value