Added more tests for the query analysis controller.