sort data before comparing in tests