Add tests for existing rewrite.

See #8.