GeneOrthologModel implements GeneModel { @Override public int hashCode() { return Objects.hash(modelId, organism, entrezGeneId, humanGeneSymbol, modelGeneId, modelGeneSymbol, phenotypeIds); } GeneOrthologModel(String modelId, Organism organism, int entrezGeneId, String humanGeneSymbol, String modelGeneId, String modelGeneSymbol, List<String> phenotypeIds); String getModelGeneId(); String getModelGeneSymbol(); @Override Organism getOrganism(); @Override Integer getEntrezGeneId(); @Override String getHumanGeneSymbol(); @Override String getId(); @Override List<String> getPhenotypeIds(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testHashCode() { GeneOrthologModel other = new GeneOrthologModel(modelId, organism, entrezGeneId, humanGeneSymbol, modelGeneId, modelGeneSymbol, modelPhenotypeIds); assertThat(instance.hashCode(), equalTo(other.hashCode())); }