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: name_test.rb
    path of file: ./repos/mushroom-observer/test/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require("test_helper")

# Tests for methods in models/name.rb and models/name/xxx.rb
class NameTest < UnitTestCase
  def create_test_name(string, force_rank = nil)
    User.current = rolf
    parse = Name.parse_name(string)
    assert(parse, "Expected this to parse: #{string}")
    params = parse.params
    param
    
  def do_name_parse_test(str, expects)
    parse = Name.parse_name(str, deprecated: expects[:deprecated])
    assert(parse, "Expected #{str.inspect} to parse!")
    any_errors = false
    msg = ["Name is wrong; expected -vs- actual:"]
    [
      :text_name,
      :real_text_name,
      :search_name,
      :real_search_name,
      :sort_name,
      :display_name,
      :parent_name,
      :rank,
      :author
    ].each do |var|
      expect = expects[var]
      actual = case var
               when :real_text_name
                 Name.display_to_real_text(parse)
               when :real_search_name
                 Name.display_to_real_search(parse)
               else
                 parse.send(var)
               end

      if actual != expect
        any_errors = true
        var = "#{var} (*)"
      end