Add test for custom comparator