Added a test for checking for duplicates