Reduce useless code and duplication in DotFilterTest.