@After
  public void after() throws Exception {
    // destroy all existing indexes
    Collection<Index> indices = server.getCache().getQueryService().getIndexes();
    indices.stream().map(Index::getName).forEach(indexName -> {
      gfsh.executeAndAssertThat("destroy index --name=" + indexName).statusIsSuccess();
    });

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