MessageToClient { public void setFault(Object response) { setResponse(response, MessageType.FAULT); }  String getJson(); void setJson(String json); MessageType getType(); void setType(MessageType type); String getId(); void setId(String id); Object getResponse(); void setConstraints(ConstraintViolation[] response); void setResult(Object response); void setFault(Object response); void setResponse(Object response); long getDeadline(); void setDeadline(long deadline); long getTime(); void setTime(long time); @Override int hashCode(); @Override boolean equals(Object obj); String toJson(); @Override String toString();  }
@Test public void testSetFault() { System.out.println("setFault"); MessageToClient instance = new MessageToClient(); Fault expResult = new Fault(null, 5); instance.setFault(expResult); Object result = instance.getResponse(); assertThat(result).isEqualTo(expResult); assertThat(instance.getType()).isEqualTo(MessageType.FAULT); }