Would be better to have an error message saying something like "Expected n messages but received x"