Fix logged errors in unit tests.