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: testrunnermediator.rb
    path of file: ./repos/powerstation/powerstation/lib/compiled-jruby/lib/ruby/stdlib/test/unit/ui
    
    the code of the file until where you have to start completion: #--
#
# Author::
    
        def run
          AutoRunner.need_auto_run = false

          result = create_result

          Test::Unit.run_at_start_hooks
          start_time = Time.now
          begin
            with_listener(result) do
              notify_listeners(RESET, @suite.size)
              notify_listeners(STARTED, result)

              run_suite(result)
            end
          ensure
            elapsed_time = Time.now - start_time
            notify_listeners(FINISHED, elapsed_time)
          end