refactored DuplicatesDetectorTest