### Question:
Status implements Copiable<Status> { public void setError(int code, String fmt, Object... args) { this.state = new State(code, String.format(String.valueOf(fmt), args)); } Status();  Status(Status s);  Status(RaftError raftError, String fmt, Object... args);  Status(int code, String fmt, Object... args);  Status(int code, String errorMsg); static Status OK(); @Override int hashCode(); @Override boolean equals(Object obj); void reset(); boolean isOk(); void setCode(int code); int getCode(); RaftError getRaftError(); void setErrorMsg(String errMsg); void setError(int code, String fmt, Object... args); void setError(RaftError error, String fmt, Object... args); @Override String toString(); @Override Status copy(); String getErrorMsg();  }### Answer:
@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()); }