Added a test for the prefiltering functionality