@Test
  public void testOptionsFactory() throws Exception {
    RocksDBStateBackend rocksDbBackend = new RocksDBStateBackend(TEMP_URI);

    rocksDbBackend.setOptions(
        new OptionsFactory() {
          @Override
          public Options createOptions(Options currentOptions) {
            return currentOptions.setCompactionStyle(CompactionStyle.FIFO);
          }
        });

    assertNotNull(rocksDbBackend.getOptions());
    assertEquals(CompactionStyle.FIFO, rocksDbBackend.getRocksDBOptions().compactionStyle());
  }
  @Test
  public void testPredefinedAndOptionsFactory() throws Exception {
    RocksDBStateBackend rocksDbBackend = new RocksDBStateBackend(TEMP_URI);

    assertEquals(PredefinedOptions.DEFAULT, rocksDbBackend.getPredefinedOptions());

    rocksDbBackend.setPredefinedOptions(PredefinedOptions.SPINNING_DISK_OPTIMIZED);
    rocksDbBackend.setOptions(
        new OptionsFactory() {
          @Override
          public Options createOptions(Options currentOptions) {
            return currentOptions.setCompactionStyle(CompactionStyle.UNIVERSAL);
          }
        });

    assertEquals(PredefinedOptions.SPINNING_DISK_OPTIMIZED, rocksDbBackend.getPredefinedOptions());
    assertNotNull(rocksDbBackend.getOptions());
    assertEquals(CompactionStyle.UNIVERSAL, rocksDbBackend.getRocksDBOptions().compactionStyle());
  }