Add rewrite_test.go