@Test
  public void testCannotCreateIndexWithInvalidIndexExpression() throws Exception {
    // Create index with wrong expression
    CommandStringBuilder csb = new CommandStringBuilder(CliStrings.CREATE_INDEX);
    csb.addOption(CliStrings.CREATE_INDEX__NAME, indexName);
    csb.addOption(CliStrings.CREATE_INDEX__EXPRESSION, "InvalidExpressionOption");
    csb.addOption(CliStrings.CREATE_INDEX__REGION, SEPARATOR + regionName);
    csb.addOption(CliStrings.CREATE_INDEX__TYPE, "hash");

    gfsh.executeAndAssertThat(csb.toString()).statusIsError();
  }
this test class test: CreateIndexCommand, DestroyIndexCommand, ListIndexCommand
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommandsIntegrationTestBase.java