Improved error messages in tests.