Added some tests for exceptions thrown