Add unit tests for marking duplicates

Intellij reports the following coverages now:
Class, %         Method, %       Line, %
100% (23/ 23)    94.4% (34/ 36)  94.8% (55/ 58)