Improve task filtering test