void writeOnce(int serverIndex) {
      final ByteBufferConsensusRequest increment = TestRequest.incrRequest();
      final TSStatus response;
      try {
        response = servers.get(serverIndex).write(gid, increment);
        Assert.assertEquals(200, response.getCode());
      } catch (ConsensusException e) {
        Assert.fail("Test Env: test write failed due to " + e);
      }
    }
A Mini Raft CLuster Wrapper for Test Env.
iotdb-core/consensus/src/test/java/org/apache/iotdb/consensus/ratis/TestUtils.java