public void setError(int code, String fmt, Object... args) {
        this.state = new State(code, String.format(String.valueOf(fmt), args));
    }
@Test
    public void testSetError() {
        Status s = new Status();
        s.setError(RaftError.EACCES.getNumber(), "test %s %d", "world", 100);
        assertEquals(RaftError.EACCES.getNumber(), s.getCode());
        assertEquals(RaftError.EACCES, s.getRaftError());
        assertEquals("test world 100", s.getErrorMsg());
        assertFalse(s.isOk());
    }