Change the way test cases deal with expected Exceptions to make the code cleaner.