Sort array in test to ensure ordering to compare.