Refactor FilterTest