Improve unit tests for markDuplicate().