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: transaction_events_test.rb
    path of file: ./repos/newrelic-ruby-agent/test/multiverse/suites/agent_only
    
    the code of the file until where you have to start completion: # This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal
    
  def test_transaction_event_error_flag_is_set
    in_transaction(:transaction_name => 'Controller/blogs/index') do |t|
      t.notice_error(RuntimeError.new('Big Controller'))
    end

    NewRelic::Agent.agent.send(:harvest_and_send_analytic_event_data)

    intrinsics, _, _ = last_transaction_event

    assert intrinsics['error'], 'Expected the error flag to be true'
  end