@Override
        public void onDestroyed(final PeerId peer) {
            LOG.info("Replicator has been destroyed");
            NodeTest.this.stoppedCounter.incrementAndGet();
        }
Test rollback stateMachine with readIndex for issue 317:
https://github.com/sofastack/sofa-jraft/issues/317
jraft-extension/java-log-storage-impl/src/test/java/com/alipay/sofa/jraft/core/NodeTest.java