Improved exception message in case the test class isn't valid