@Test
public void testClose() throws IOException {

    File bd = mkdir("close");
    PersistentMessageBuffer mb = new PersistentMessageBuffer(bd);
    assertTrue(mb.isOpen());
    mb.close();
    mb.close();  // already closed is NOP
    assertFalse(mb.isOpen());
    try {
        mb.append(0L, "", new byte[0]);
        fail();
    } catch (IOException e) {
        // good
    }
}