Correct test code for unique index