@Override
                            public void run(Status status) {
                                if (status.isOk()) {
                                    snapshotsExpected.add(logId.copy());
                                } else {
                                    assertEquals(status.getCode(), RaftError.EBUSY.getNumber());
                                }
                                running.countDown();

                            }
Test rollback stateMachine with readIndex for issue 317:
https://github.com/sofastack/sofa-jraft/issues/317
jraft-core/src/test/java/com/alipay/sofa/jraft/core/NodeTest.java