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