If you expect an certain error to be logged, you should pass in the error type in the argument to `flushLoggedErrors`. Then inspect the result with an assert, if only for the length of the list. If (due to a bug) other errors are logged, this test would then fail, which is a good thing.