void resetSMProviderBeforeRestart(Supplier<IStateMachine> smProvider) {
      Preconditions.checkArgument(
          isStopped.get(), "call resetSMProviderBeforeRestart() before restart");
      this.smProvider = smProvider;
    }
A Mini Raft CLuster Wrapper for Test Env.
iotdb-core/consensus/src/test/java/org/apache/iotdb/consensus/ratis/TestUtils.java