GeneSymbolFilter implements VariantFilter { @Override public int hashCode() { int hash = 7; hash = 97 * hash + Objects.hashCode(GeneSymbolFilter.filterType); hash = 97 * hash + Objects.hashCode(this.genesToKeep); return hash; } GeneSymbolFilter(Set<String> genesToKeep); Set<String> getGeneSymbols(); @Override FilterType getFilterType(); @Override FilterResult runFilter(VariantEvaluation variantEvaluation); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testHashCode() { Filter instance = geneSymbolFilter(WANTED_GENE_SYMBOL); Filter otherFilter = geneSymbolFilter(WANTED_GENE_SYMBOL); assertThat(instance.hashCode(), equalTo(otherFilter.hashCode())); }