GeneSymbolFilter implements VariantFilter { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final GeneSymbolFilter other = (GeneSymbolFilter) obj; return Objects.equals(this.genesToKeep, other.genesToKeep); } 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 testEquals() { Filter instance = geneSymbolFilter(WANTED_GENE_SYMBOL); Filter otherFilter = geneSymbolFilter(WANTED_GENE_SYMBOL); assertThat(instance, equalTo(otherFilter)); }