Fixed errors in the unit tests caused by ordering of relationship data in some models.