### Question:
DeleteInstruction implements Instruction { @Override public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final DeleteInstruction other = (DeleteInstruction) obj; if (termsToDelete == null) { if (other.termsToDelete != null) return false; } else if (!termsToDelete.equals(other.termsToDelete)) return false; return true; } DeleteInstruction(final List<? extends Term> termsToDelete); List<? extends Term> getTermsToDelete(); @Override void apply(final PositionSequence<querqy.model.Term> sequence, final TermMatches termMatches,
                     final int startPosition, final int endPosition, final ExpandedQuery expandedQuery,
                     final SearchEngineRequestAdapter searchEngineRequestAdapter); boolean isToBeDeleted(final querqy.model.Term term); @Override Set<querqy.model.Term> getGenerableTerms(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }### Answer:
@Test public void testEquals() { DeleteInstruction delete1 = new DeleteInstruction(Arrays.asList(mkTerm("a"), mkTerm("b"))); DeleteInstruction delete2 = new DeleteInstruction(Arrays.asList(mkTerm("a"), mkTerm("b"))); DeleteInstruction delete3 = new DeleteInstruction(Arrays.asList(mkTerm("a"), mkTerm("c"))); DeleteInstruction delete4 = new DeleteInstruction(Arrays.asList(mkTerm("c"), mkTerm("a"))); assertEquals(delete1, delete2); assertEquals(delete1.hashCode(), delete2.hashCode()); assertNotEquals(delete1, delete3); assertNotEquals(delete2, delete3); assertNotEquals(delete3, delete4); assertNotEquals(delete1, null); assertNotEquals(delete1, new Object()); }