Used 'as' keyword for exceptions.
unit tests for query exception.