@Test public void queue_persisted(){

    File f = Utils.tempDbFile();
    DB db = DBMaker.newFileDB(f).journalDisable().cacheDisable().asyncWriteDisable().make();
    Queue<Object> queue = db.getQueue("test");
    queue.add("1");
    queue.add("2");
    queue.add("3");
    queue.add("4");
    db.close();
    db = DBMaker.newFileDB(f).journalDisable().cacheDisable().asyncWriteDisable().deleteFilesAfterClose().make();
    queue = db.getQueue("test");
    assertEquals("1", queue.poll());
    assertEquals("2", queue.poll());
    assertEquals("3", queue.poll());
    assertEquals("4", queue.poll());
    assertNull(queue.poll());
    db.close();
}