Fix tests by sorting before deep equalling