Added tests for removeDuplicates