Fixed #23958 - Rewrote filter tests as unit tests.

most of the `render()` lines throughout this change seem short enough that they could be 1 lined, do you think breaking it up improves readability?