# File lib/sinatra/async/test.rb, line 40
    def handle_last_response(uri, env, status, headers, body)
      @last_response = Rack::MockResponse.new(status, headers, body, env["rack.errors"].flush)
      body.close if body.respond_to?(:close)

      cookie_jar.merge(last_response.headers["Set-Cookie"], uri)

      @after_request.each { |hook| hook.call }
      @last_response
    end