MessageToClient { @Override public int hashCode() { int hash = 7; hash = 83 * hash + Objects.hashCode(this.id); return hash; }  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 testHashCode() { System.out.println("testHashCode"); MessageToClient a = createRandom(); MessageToClient b = createRandom(); assertThat(a.hashCode()).isEqualTo(a.hashCode()); assertThat(a.hashCode()).isNotEqualTo(b.hashCode()); b.setId(a.getId()); assertThat(a.hashCode()).isEqualTo(b.hashCode()); }