Add test for duplicates in entities