Added rewrite rule for compare matcher.

Had to define a different expected rule for different rewrite method, a
little bit hackish