Well, for assertEquals, the checking logic works the same if you invert the arguments. But the error message would be confusing in this case as it mentions the expectation.