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: adaptive_sampler_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: true

module NewRelic
  module Agent
    class AdaptiveSamplerTest < Minitest::Test
      include MultiverseHelpers

      setup_and_teardown_agent do
        NewRelic::Agent.config.add_config_for_testin
    
      def test_adaptive_sampler_valid_stats_and_reset_after_harvest
        nr_freeze_process_time

        sampled_count = 0
        20.times do |i|
          in_transaction("test_txn_#{i}") do |txn|
            sampled_count += 1 if txn.sampled?
          end
        end

        stats = NewRelic::Agent.instance.adaptive_sampler.stats

        assert_equal 0, stats[:seen_last]
        assert_equal 20, stats[:seen]
        assert_equal sampled_count, stats[:sampled_count]

        advance_process_time(60)

        in_transaction('test_txn_20') {}

        stats = NewRelic::Agent.instance.adaptive_sampler.stats

        assert_equal 1, stats[:seen]
        assert_equal 20, stats[:seen_last]
      end