### Question:
RDBStore implements DBStore { @Override public void compactDB() throws IOException { if (db != null) { try { db.compactRange(); } catch (RocksDBException e) { throw toIOException("Failed to compact db", e); } } } @VisibleForTesting  RDBStore(File dbFile, DBOptions options,
                  Set<TableConfig> families);  RDBStore(File dbFile, DBOptions options,
      WriteOptions writeOptions, Set<TableConfig> families,
                  CodecRegistry registry); static IOException toIOException(String msg, RocksDBException e); @Override void compactDB(); @Override void close(); @Override void move(K key, Table<K, V> source,
                                Table<K, V> dest); @Override void move(K key, V value, Table<K, V> source,
                                Table<K, V> dest); @Override void move(K sourceKey, K destKey, V value,
                                Table<K, V> source,
                                Table<K, V> dest); @Override long getEstimatedKeyCount(); @Override BatchOperation initBatchOperation(); @Override void commitBatchOperation(BatchOperation operation); @Override Table<byte[], byte[]> getTable(String name); @Override Table<K, V> getTable(String name,
      Class<K> keyType, Class<V> valueType); @Override Table<K, V> getTable(String name,
      Class<K> keyType, Class<V> valueType,
      TableCacheImpl.CacheCleanupPolicy cleanupPolicy); @Override ArrayList<Table> listTables(); @Override void flushDB(); @Override void flushLog(boolean sync); @Override DBCheckpoint getCheckpoint(boolean flush); @Override File getDbLocation(); @Override Map<Integer, String> getTableNames(); @Override CodecRegistry getCodecRegistry(); @Override DBUpdatesWrapper getUpdatesSince(long sequenceNumber); @VisibleForTesting RocksDB getDb(); RDBMetrics getMetrics();  }### Answer:
@Test public void compactDB() throws Exception { try (RDBStore newStore = new RDBStore(folder.newFolder(), options, configSet)) { Assert.assertNotNull("DB Store cannot be null", newStore); insertRandomData(newStore, 1); newStore.compactDB(); } }