Checks that the head of the last message received matches that of the passed string, and throws if it does not.
The expected head, which may include some replace-tokens.
The file the test is in.
The line the test is on.
Exception if the head of the last message received does not match the expected string.
Checks that the head of the last message received matches that of the passed string, and throws if it does not.