@Test
  public void testWithUnsetGfshEnvironmentVariables() {
    addIgnoredException(QueryInvalidException.class);

    String query = "query --query=\"" +
        "select ID , status , createTime , pk, floatMinValue " +
        "from ${UNSET_REGION} " +
        "where ID <= ${UNSET_PORTFOLIO_ID} and status=${UNSET_STATUS}" + "\" --interactive=false";

    gfsh.executeAndAssertThat(query)
        .statusIsError()
        .containsOutput(String.format("Syntax error in query: %s", ""));
  }
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