public DeleteGranularity deleteGranularity() {
    String valueAsString =
        confParser
            .stringConf()
            .option(SparkWriteOptions.DELETE_GRANULARITY)
            .tableProperty(TableProperties.DELETE_GRANULARITY)
            .defaultValue(TableProperties.DELETE_GRANULARITY_DEFAULT)
            .parse();
    return DeleteGranularity.fromString(valueAsString);
  }
@Test
  public void testDeleteGranularityWriteOption() {
    Table table = validationCatalog.loadTable(tableIdent);

    table
        .updateProperties()
        .set(TableProperties.DELETE_GRANULARITY, DeleteGranularity.PARTITION.toString())
        .commit();

    Map<String, String> options =
        ImmutableMap.of(SparkWriteOptions.DELETE_GRANULARITY, DeleteGranularity.FILE.toString());

    SparkWriteConf writeConf = new SparkWriteConf(spark, table, options);

    DeleteGranularity value = writeConf.deleteGranularity();
    assertThat(value).isEqualTo(DeleteGranularity.FILE);
  }