refactoring tests for the new error messags