Added tests for exceptions classes.