public static HoodieWriteConfig.Builder newBuilder() {
    return new Builder();
  }
@Test
  public void testNonBlockingConcurrencyControlInvalidEarlyConflictDetection() {
    Properties props = new Properties();
    props.put(HoodieTableConfig.TYPE.key(), HoodieTableType.MERGE_ON_READ.name());
    props.setProperty(KeyGeneratorOptions.RECORDKEY_FIELD_NAME.key(), "uuid");
    HoodieWriteConfig.Builder writeConfigBuilder = HoodieWriteConfig.newBuilder().withPath("/tmp");
    assertThrows(
        IllegalArgumentException.class,
        () -> writeConfigBuilder.withIndexConfig(
            HoodieIndexConfig.newBuilder()
                .fromProperties(props)
                .withIndexType(HoodieIndex.IndexType.BUCKET)
                .withBucketIndexEngineType(HoodieIndex.BucketIndexEngineType.SIMPLE)
                .build())
            .withWriteConcurrencyMode(WriteConcurrencyMode.NON_BLOCKING_CONCURRENCY_CONTROL)
            .withEarlyConflictDetectionEnable(true)
            .build(),
        "To use early conflict detection, set hoodie.write.concurrency.mode=OPTIMISTIC_CONCURRENCY_CONTROL");
  }