@Test
  public void testFailWhenDestroyIndexIsNotIdempotent() throws Exception {
    createSimpleIndexA();

    CommandStringBuilder csb = new CommandStringBuilder(CliStrings.DESTROY_INDEX);
    csb.addOption(CliStrings.DESTROY_INDEX__NAME, indexName);
    csb.addOption(CliStrings.IFEXISTS, "false");
    gfsh.executeAndAssertThat(csb.toString()).statusIsSuccess()
        .containsOutput("Destroyed index " + indexName);
    gfsh.executeAndAssertThat(csb.toString()).statusIsError()
        .containsOutput("Index named \"" + indexName + "\" not found");
  }
this test class test: CreateIndexCommand, DestroyIndexCommand, ListIndexCommand
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommandsIntegrationTestBase.java