Tests for exception messages

- Added tests for expected messages in exceptions thrown by the system.