Refactored TestTableRelationship