public void test_allocCommitFreeCommitWriteCache(){
  Journal store=(Journal)getStore();
  try {
    RWStrategy bs=(RWStrategy)store.getBufferStrategy();
    final long addr=bs.write(randomData(78));
    assertTrue(bs.inWriteCache(addr));
    store.commit();
    bs.delete(addr);
    assertTrue(bs.inWriteCache(addr));
    store.commit();
    assertFalse(bs.inWriteCache(addr));
  }
  finally {
    store.destroy();
  }
}

public void test_allocCommitFreeCommitWriteCache ( ) { Journal store = ( Journal ) getStore ( ) ; try { RWStrategy bs = ( RWStrategy ) store . getBufferStrategy ( ) ; final long addr = bs . write ( randomData ( 78 ) ) ; assertTrue ( bs . inWriteCache ( addr ) ) ; store . commit ( ) ; bs . delete ( addr ) ; assertTrue ( bs . inWriteCache ( addr ) ) ; store . commit ( ) ; assertFalse ( bs . inWriteCache ( addr ) ) ; } finally { store . destroy ( ) ; } }
state3 allocate - commit - free - commit tracks writecache state through allocation
