@Test
  public void testListIndexValidField() throws Exception {
    CommandStringBuilder createStringBuilder = new CommandStringBuilder(CliStrings.CREATE_INDEX);
    createStringBuilder.addOption(CliStrings.CREATE_INDEX__NAME, indexName);
    createStringBuilder.addOption(CliStrings.CREATE_INDEX__EXPRESSION, "\"h.low\"");
    createStringBuilder.addOption(CliStrings.CREATE_INDEX__REGION,
        "\"" + SEPARATOR + regionName + " s, s.history h\"");

    gfsh.executeAndAssertThat(createStringBuilder.toString()).statusIsSuccess();
    assertThat(gfsh.getGfshOutput()).contains("Index successfully created");

    gfsh.executeAndAssertThat("list index").statusIsSuccess();
    assertThat(gfsh.getGfshOutput()).contains("indexA");
  }
this test class test: CreateIndexCommand, DestroyIndexCommand, ListIndexCommand
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommandsIntegrationTestBase.java