Tests for equality rewrite