add check for duplicates in unit test