Check for specific exception message in test