Added tests for QueryController and ExceptionController