@Test
  public void testSimpleQuery() {
    server1.invoke(() -> setUpDataForRegion(PARTITIONED_REGION_NAME_PATH));

    int randomInteger = new Random(nanoTime()).nextInt(MAX_RANDOM_INTEGER);

    String query = "query --query=\"" +
        "select ID , status , createTime , pk, floatMinValue " +
        "from " + PARTITIONED_REGION_NAME_PATH + " " +
        "where ID <= " + randomInteger + "\" --interactive=false";

    TabularResultModel resultModel =
        gfsh.executeAndAssertThat(query).statusIsSuccess().hasTableSection()
            .hasRowSize(randomInteger + 1).getActual();
    assertThat(resultModel.getValuesInColumn("ID").size()).isGreaterThan(0);
    assertThat(resultModel.getValuesInColumn("status").size()).isGreaterThan(0);
    assertThat(resultModel.getValuesInColumn("createTime").size()).isGreaterThan(0);
    assertThat(resultModel.getValuesInColumn("pk").size()).isGreaterThan(0);
    assertThat(resultModel.getValuesInColumn("floatMinValue").size()).isGreaterThan(0);

  }
Override to specify the mechanism used to connect to the Locator.
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/QueryCommandDistributedTestBase.java