improved error message in test