@Before
  public void setUp() throws Exception {

    utils = QueryTestUtils.getInstance();
    utils.createCache(null);
    // create regions
    utils.createReplicateRegion("exampleRegion");
    utils.createReplicateRegion("numericRegion");
    // put entries in the region
    populatePortfolioValuesInRegion("exampleRegion", 10);
    populateNumericValuesInRegion("numericRegion", 10);
  }
A sample test class using the QueryTestUtils
geode-core/src/integrationTest/java/org/apache/geode/cache/query/QueryTestUtilsJUnitTest.java