refactor query DSL test for better readability