Refactoring QueryBuilderTest