PhenoGridMatchTaxon { @Override public int hashCode() { int hash = 7; hash = 29 * hash + Objects.hashCode(this.id); hash = 29 * hash + Objects.hashCode(this.label); return hash; } PhenoGridMatchTaxon(String id, String label); String getId(); String getLabel(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testHashCode() { PhenoGridMatchTaxon other = new PhenoGridMatchTaxon(id, label); assertThat(instance.hashCode(), equalTo(other.hashCode())); }