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: notes_controller_test.rb
    path of file: ./repos/openstreetmap-website/test/controllers
    
    the code of the file until where you have to start completion: require "test_helper"

class NotesControllerTest < ActionDispatch::IntegrationTest
  def
    
  def test_index_success
    first_user = create(:user)
    second_user = create(:user)
    moderator_user = create(:moderator_user)

    create(:note) do |note|
      create(:note_comment, :note => note, :author => first_user)
    end
    create(:note) do |note|
      create(:note_comment, :note => note, :author => second_user)
    end
    create(:note, :status => "hidden") do |note|
      create(:note_comment, :note => note, :author => second_user)
    end

    # Note that the table rows include a header row
    get user_notes_path(:display_name => first_user.display_name)
    assert_response :success
    assert_select "table.note_list tr", :count => 2

    get user_notes_path(:display_name => second_user.display_name)
    assert_response :success
    assert_select "table.note_list tr", :count => 2

    get user_notes_path(:display_name => "non-existent")
    assert_response :not_found

    session_for(moderator_user)

    get user_notes_path(:display_name => first_user.display_name)
    assert_response :success
    assert_select "table.note_list tr", :count => 2

    get user_notes_path(:display_name => second_user.display_name)
    assert_response :success
    assert_select "table.note_list tr", :count => 3

    get user_notes_path(:display_name => "non-existent")
    assert_response :not_found
  end