Update tests for duplicate message, and add error class for Duplicates