Test Rewrite class