Update createRelationship method with better assertions