moved is_dup to a static TestResult function