Tests updated to check execution of query