# File test/test_redirect.rb, line 105
    def test_URL_with_replacing
      redirect = Rucy::RegexpRedirectDocument.new(%"^.*/bar/(.*)$", 'http://www.foo.bar/\1/index.html')
      @request.method = 'GET'
      @request.path = '/foo/bar/baz'
      @request.version = 'HTTP/1.1'
      redirect.publish('', @request, @response, self)
      assert_equal('HTTP/1.1', @messg_head.version)
      assert_equal(302, @messg_head.status)
      assert_equal('Found', @messg_head.reason)
      assert_equal('http://www.foo.bar/baz/index.html', @messg_head.header('Location'))
      assert((@messg_head.has_header? 'Content-Type'))
      assert(! @messg_body.empty?)
    end