You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: autocomplete_controller_test.rb
    path of file: ./repos/danbooru/test/functional
    
    the code of the file until where you have to start completion: require "test_helper"

class AutocompleteControllerTest < ActionDispatch::IntegrationTest
  def autocomplete(query, type = "tag_query")
    get autocomplete_index_path(search: { que
    
  def assert_autocomplete_highlights(expected_results, query, type = "tag_query")
    get autocomplete_index_path(search: { query: query, type: type })
    assert_response :success

    results = response.parsed_body.css("li a").map do |html|
      html.inner_html.strip.remove(/<\/?span>/).gsub(/<b>(.*?)<\/b>/) { $1.upcase }
    end

    assert_equal(results, expected_results)
  end