Added sorting to asserts