public static HoodieWriteConfig.Builder newBuilder() {
    return new Builder();
  }
@Test
  public void testConsistentBucketIndexInvalidClusteringConfig() {
    Properties props = new Properties();
    props.setProperty(KeyGeneratorOptions.RECORDKEY_FIELD_NAME.key(), "uuid");
    TypedProperties consistentBucketIndexProps = HoodieIndexConfig.newBuilder().fromProperties(props).withIndexType(HoodieIndex.IndexType.BUCKET)
        .withBucketIndexEngineType(HoodieIndex.BucketIndexEngineType.CONSISTENT_HASHING).build().getProps();
    HoodieWriteConfig.Builder writeConfigBuilder = HoodieWriteConfig.newBuilder().withPath("/tmp");

    assertThrows(IllegalArgumentException.class,
        () -> writeConfigBuilder.withClusteringConfig(HoodieClusteringConfig.newBuilder()
            .fromProperties(consistentBucketIndexProps)
            .withClusteringPlanStrategyClass(HoodieClusteringConfig.JAVA_SIZED_BASED_CLUSTERING_PLAN_STRATEGY).build()));
    assertThrows(IllegalArgumentException.class,
        () -> writeConfigBuilder.withClusteringConfig(HoodieClusteringConfig.newBuilder()
            .fromProperties(consistentBucketIndexProps)
            .withClusteringExecutionStrategyClass(HoodieClusteringConfig.SPARK_SORT_AND_SIZE_EXECUTION_STRATEGY).build()));
  }