Unittest of exceptions