MessageFromClient { @Override public int hashCode() { int hash = 5; hash = 79 * hash + Objects.hashCode(this.id); return hash; }  String getId(); void setId(String messageId); String getDataService(); void setDataService(String dataService); String getOperation(); void setOperation(String operation); List<String> getParameters(); void setParameters(List<String> parameters); @Override int hashCode(); @Override boolean equals(Object obj); static MessageFromClient createFromJson(String json);  }
@Test public void testHashCode() { System.out.println("testHashCode"); MessageFromClient a = createRandom(); MessageFromClient b = createRandom(); assertThat(a.hashCode()).isEqualTo(a.hashCode()); assertThat(a.hashCode()).isNotEqualTo(b.hashCode()); b.setId(a.getId()); assertThat(a.hashCode()).isEqualTo(b.hashCode()); }