PriorityScoreFilter implements GeneFilter { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final PriorityScoreFilter other = (PriorityScoreFilter) obj; if (Float.floatToIntBits(this.minPriorityScore) != Float.floatToIntBits(other.minPriorityScore)) { return false; } return this.priorityType == other.priorityType; } PriorityScoreFilter(PriorityType priorityType, float minPriorityScore); PriorityType getPriorityType(); float getMinPriorityScore(); @Override FilterType getFilterType(); @Override FilterResult runFilter(Gene gene); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testEquals() { PriorityScoreFilter other = new PriorityScoreFilter(priorityType, minPriorityScore); assertThat(instance.equals(other), is(true)); }
@Test public void testNotEqualsDifferentScore() { PriorityScoreFilter other = new PriorityScoreFilter(priorityType, minPriorityScore + .03f); assertThat(instance.equals(other), is(false)); }
@Test public void testNotEqualsDifferentPrioritiser() { PriorityScoreFilter other = new PriorityScoreFilter(PriorityType.NONE, minPriorityScore); assertThat(instance.equals(other), is(false)); }
@Test public void testNotEqualOtherObject() { String string = "string"; assertThat(instance.equals(string), is(false)); assertThat(string.equals(instance), is(false)); }
@Test public void testNotEqualNull() { Object object = null; assertThat(instance.equals(object), is(false)); }