Addind functional tests to cover relations properly