public void createClient(VM client, final int[] serverPorts, final String serverHost,
      final String redundancyLevel, final String poolName) {
    SerializableRunnable createQService = new CacheSerializableRunnable("Create Client") {
      @Override
      public void run2() throws CacheException {
        LogWriterUtils.getLogWriter().info("### Create Client. ###");
        // Region region1 = null;
        // Initialize CQ Service.
        try {
          getCache().getQueryService();
        } catch (Exception cqe) {
          Assert.fail("Failed to getCQService.", cqe);
        }

        AttributesFactory regionFactory = new AttributesFactory();
        regionFactory.setScope(Scope.LOCAL);

        if (poolName != null) {
          regionFactory.setPoolName(poolName);
        } else {
          if (redundancyLevel != null) {
            ClientServerTestCase.configureConnectionPool(regionFactory, serverHost, serverPorts,
                true, Integer.parseInt(redundancyLevel), -1, null);
          } else {
            ClientServerTestCase.configureConnectionPool(regionFactory, serverHost, serverPorts,
                true, -1, -1, null);
          }
        }

        createRootRegion(regionFactory.createRegionAttributes());
        LogWriterUtils.getLogWriter().info("### Successfully Created Root Region on Client");
      }
    };

    client.invoke(createQService);
  }
Creates Init Values. start specifies the start index from which key no would start.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java