GeneticInterval implements ChromosomalRegion { @Override public int hashCode() { int hash = 5; hash = 97 * hash + this.chromosome; hash = 97 * hash + this.start; hash = 97 * hash + this.end; return hash; } GeneticInterval(int chromosome, int start, int end); static GeneticInterval parseString(String interval); @Override int getChromosome(); @Override int getStart(); @Override int getEnd(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testHashCode() { int expResult = new GeneticInterval(CHR, START, END).hashCode(); int result = instance.hashCode(); assertThat(result, equalTo(expResult)); }