Fixed #23958 - Rewrote filter tests as unit tests.

I am not sure why the r'' prefix is on these tests. I removed it from the first two here and they seem to pass. Could you check the others?