LevelDBReadOptions implements AutoCloseable { public void close() { checkReadOptionsOpen(); LevelDBNative.leveldb_readoptions_destroy(readOptions); readOptions = null; } LevelDBReadOptions(); void close(); boolean isVerifyChecksum(); void setVerifyChecksum(boolean verifyChecksum); boolean isFillCache(); void setFillCache(boolean fillCache);  }
@Test public void create_and_close() { LevelDBReadOptions readOptions = new LevelDBReadOptions(); readOptions.close(); }
@Test(expected = LevelDBException.class) public void create_and_close_twice() { LevelDBReadOptions readOptions = new LevelDBReadOptions(); readOptions.close(); readOptions.close(); }