Refactor the logic to check relation unique in class level or method level
Added nagative test to check relation unique in method level