Added test & recover for unique key duplicates