private int fakeWriteBB(OverflowOplog ol, ByteBuffer bb) throws IOException {
    if (nFakeChannelWrites > 0) {
      bb.position(bb.limit());
      --nFakeChannelWrites;
      return 0;
    }
    doCallRealMethod().when(spyCh).write(bb);
    return spyCh.write(bb);
  }
Testing recovery from failures writing OverflowOplog entries
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/OverflowOplogFlushTest.java