Fix test case assertion against Exception