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: test_out_stream.rb
    path of file: ./repos/fluentd/test/plugin
    
    the code of the file until where you have to start completion: require_relative '../helper'
require 'fluent/test'
require 'fluent/plugin/out_stream'

module StreamOutputTest
  def setup
    Fluent::Test.setup
  
    
  def test_write
    d = create_driver

    time = Time.parse("2011-01-02 13:14:15 UTC").to_i
    d.emit({"a"=>1}, time)
    d.emit({"a"=>2}, time)

    expect = ["test",
        [time,{"a"=>1}].to_msgpack +
        [time,{"a"=>2}].to_msgpack
      ].to_msgpack

    result = d.run
    assert_equal(expect, result)
  end