Fix task quries tests after the refactoring

Some of the tests fixed and some of them (no longer needed ones) removed.