Refactoring of the CanIQueryTest