@Test
public void testCacheWeakRefEnable() throws Exception {

    DB db = DBMaker
            .newMemoryDB()
            .journalDisable()
            .cacheWeakRefEnable()
            .make();
    verifyDB(db);
    assertTrue(db.engine.getClass() == CacheWeakSoftRef.class);
    assertTrue(((CacheWeakSoftRef)db.engine).useWeakRef);
}