@Override
  public void delete(final String path, final int version, final AsyncCallback.VoidCallback cb, final Object ctx)
  {
    final RetryCallback callback = new RetryCallback() {
      @Override
      protected void retry() {
        _log.info("Retry delete operation: path = " + path + " version = " + version);
        zkDelete(path, version, this, ctx);
      }
      @Override
      protected void processVoidResult(int cbRC, String cbPath, Object cbCtx)
      {
        cb.processResult(cbRC, cbPath, cbCtx);
      }
    };
    zkDelete(path, version, callback, ctx) ;
  }
@Test
  public void testDelete() throws NoSuchMethodException
  {
    final RetryZooKeeper rzkPartialMock = createMockObject(
        RetryZooKeeper.class.getMethod("zkDelete",
                                       String.class,
                                       int.class,
                                       AsyncCallback.VoidCallback.class,
                                       Object.class));

    // mock up zkDelete, which wrapper's ZooKeeper's delete
    rzkPartialMock.zkDelete(
        (String) EasyMock.anyObject(),
        EasyMock.anyInt(),
        (AsyncCallback.VoidCallback) EasyMock.anyObject(),
        EasyMock.anyObject());

    // first try, "connection loss"
    expectDeleteCallbackWithCode(_connectionLossRC);
    // second try, "no node"
    expectDeleteCallbackWithCode(KeeperException.Code.NONODE.intValue());
    EasyMock.replay(rzkPartialMock);
    rzkPartialMock.delete(_dummyPath, _dummyVersion, _dummyVoidCallback, _dummyCtx);
    EasyMock.verify(rzkPartialMock);
  }