Added test for rewrites