TaskQueryService - implementing several queries, adding tests