Refactor exception tests

Split big test into several tests. This improves readability. Also, if an assertion fails, the corresponding test can be found easily.