Add unittest for filter engine